Skip to content

Commit

Permalink
Merge tag 'keys-next-20200602' of git://git.kernel.org/pub/scm/linux/…
Browse files Browse the repository at this point in the history
…kernel/git/dhowells/linux-fs

Pull keyring updates from David Howells:

 - Fix a documentation warning.

 - Replace a zero-length array with a flexible one

 - Make the big_key key type use ChaCha20Poly1305 and use the crypto
   algorithm directly rather than going through the crypto layer.

 - Implement the update op for the big_key type.

* tag 'keys-next-20200602' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs:
  keys: Implement update for the big_key type
  security/keys: rewrite big_key crypto to use library interface
  KEYS: Replace zero-length array with flexible-array
  Documentation: security: core.rst: add missing argument
  • Loading branch information
Linus Torvalds committed Jun 4, 2020
2 parents 38b3a5a + b6f61c3 commit a484a49
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 212 deletions.
8 changes: 6 additions & 2 deletions Documentation/security/keys/core.rst
Original file line number Diff line number Diff line change
Expand Up @@ -920,10 +920,14 @@ The keyctl syscall functions are:

long keyctl(KEYCTL_PKEY_QUERY,
key_serial_t key_id, unsigned long reserved,
const char *params,
struct keyctl_pkey_query *info);
Get information about an asymmetric key. The information is returned in
the keyctl_pkey_query struct::
Get information about an asymmetric key. Specific algorithms and
encodings may be queried by using the ``params`` argument. This is a
string containing a space- or tab-separated string of key-value pairs.
Currently supported keys include ``enc`` and ``hash``. The information
is returned in the keyctl_pkey_query struct::

__u32 supported_ops;
__u32 key_size;
Expand Down
1 change: 1 addition & 0 deletions include/keys/big_key-type.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,6 @@ extern void big_key_revoke(struct key *key);
extern void big_key_destroy(struct key *key);
extern void big_key_describe(const struct key *big_key, struct seq_file *m);
extern long big_key_read(const struct key *key, char *buffer, size_t buflen);
extern int big_key_update(struct key *key, struct key_preparsed_payload *prep);

#endif /* _KEYS_BIG_KEY_TYPE_H */
2 changes: 1 addition & 1 deletion include/keys/user-type.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
struct user_key_payload {
struct rcu_head rcu; /* RCU destructor */
unsigned short datalen; /* length of this data */
char data[0] __aligned(__alignof__(u64)); /* actual data */
char data[] __aligned(__alignof__(u64)); /* actual data */
};

extern struct key_type key_type_user;
Expand Down
4 changes: 1 addition & 3 deletions security/keys/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,7 @@ config BIG_KEYS
bool "Large payload keys"
depends on KEYS
depends on TMPFS
select CRYPTO
select CRYPTO_AES
select CRYPTO_GCM
depends on CRYPTO_LIB_CHACHA20POLY1305 = y
help
This option provides support for holding large keys within the kernel
(for example Kerberos ticket caches). The data may be stored out to
Expand Down
Loading

0 comments on commit a484a49

Please sign in to comment.