mirror of
https://github.com/torvalds/linux.git
synced 2024-11-24 13:11:40 +00:00
c236b6dd48
-----BEGIN PGP SIGNATURE----- iQIVAwUAXRPObfu3V2unywtrAQJLKA//WENO5pZDHe49T+4GCY0ZmnGHKBUnU7g9 DUjxSNS8a/nwCyEdApZk9uHp2xsOedP6pjQ4VRWMQfrIPx0Yh9o3J+BQxvyP7PDf jEH+5CYC8dZnJJjjteWCcPEGrUoNb1YKfDRBU745YY+rLdHWvhHc27B6SYBg5BGT OwW3qyHvp0WMp7TehMALdnkqGph5gR5QMr45tOrH6DkGAhN8mAIKD699d3MqZG73 +S5KlQOlDlEVrxbD/BgzlzEJQUBQyq8hd61taBFT7LXBNlLJJOnMhd7UJY5IJE7J Vi9NpcLj4Emwv4wvZ2xneV0rMbsCbxRMKZLDRuqQ6Tm17xjpjro4n1ujneTAqmmy d+XlrVQ2ZMciMNmGleezOoBib9QbY5NWdilc2ls5ydFGiBVL73bIOYtEQNai8lWd LBBIIrxOmLO7bnipgqVKRnqeMdMkpWaLISoRfSeJbRt4lGxmka9bDBrSgONnxzJK JG+sB8ahSVZaBbhERW8DKnBz61Yf8ka7ijVvjH3zCXu0rbLTy+LLUz5kbzbBP9Fc LiUapLV/v420gD2ZRCgPQwtQui4TpBkSGJKS1Ippyn7LGBNCZLM4Y8vOoo4nqr7z RhpEKbKeOdVjORaYjO8Zttj8gN9rT6WnPcyCTHdNEnyjotU1ykyVBkzexj+VYvjM C3eIdjG7Jk0= =c2FO -----END PGP SIGNATURE----- Merge tag 'keys-request-20190626' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs Pull request_key improvements from David Howells: "These are all request_key()-related, including a fix and some improvements: - Fix the lack of a Link permission check on a key found by request_key(), thereby enabling request_key() to link keys that don't grant this permission to the target keyring (which must still grant Write permission). Note that the key must be in the caller's keyrings already to be found. - Invalidate used request_key authentication keys rather than revoking them, so that they get cleaned up immediately rather than hanging around till the expiry time is passed. - Move the RCU locks outwards from the keyring search functions so that a request_key_rcu() can be provided. This can be called in RCU mode, so it can't sleep and can't upcall - but it can be called from LOOKUP_RCU pathwalk mode. - Cache the latest positive result of request_key*() temporarily in task_struct so that filesystems that make a lot of request_key() calls during pathwalk can take advantage of it to avoid having to redo the searching. This requires CONFIG_KEYS_REQUEST_CACHE=y. It is assumed that the key just found is likely to be used multiple times in each step in an RCU pathwalk, and is likely to be reused for the next step too. Note that the cleanup of the cache is done on TIF_NOTIFY_RESUME, just before userspace resumes, and on exit" * tag 'keys-request-20190626' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs: keys: Kill off request_key_async{,_with_auxdata} keys: Cache result of request_key*() temporarily in task_struct keys: Provide request_key_rcu() keys: Move the RCU locks outwards from the keyring search functions keys: Invalidate used request_key authentication keys keys: Fix request_key() lack of Link perm check on found key
123 lines
4.1 KiB
Plaintext
123 lines
4.1 KiB
Plaintext
# SPDX-License-Identifier: GPL-2.0-only
|
|
#
|
|
# Key management configuration
|
|
#
|
|
|
|
config KEYS
|
|
bool "Enable access key retention support"
|
|
select ASSOCIATIVE_ARRAY
|
|
help
|
|
This option provides support for retaining authentication tokens and
|
|
access keys in the kernel.
|
|
|
|
It also includes provision of methods by which such keys might be
|
|
associated with a process so that network filesystems, encryption
|
|
support and the like can find them.
|
|
|
|
Furthermore, a special type of key is available that acts as keyring:
|
|
a searchable sequence of keys. Each process is equipped with access
|
|
to five standard keyrings: UID-specific, GID-specific, session,
|
|
process and thread.
|
|
|
|
If you are unsure as to whether this is required, answer N.
|
|
|
|
config KEYS_COMPAT
|
|
def_bool y
|
|
depends on COMPAT && KEYS
|
|
|
|
config KEYS_REQUEST_CACHE
|
|
bool "Enable temporary caching of the last request_key() result"
|
|
depends on KEYS
|
|
help
|
|
This option causes the result of the last successful request_key()
|
|
call that didn't upcall to the kernel to be cached temporarily in the
|
|
task_struct. The cache is cleared by exit and just prior to the
|
|
resumption of userspace.
|
|
|
|
This allows the key used for multiple step processes where each step
|
|
wants to request a key that is likely the same as the one requested
|
|
by the last step to save on the searching.
|
|
|
|
An example of such a process is a pathwalk through a network
|
|
filesystem in which each method needs to request an authentication
|
|
key. Pathwalk will call multiple methods for each dentry traversed
|
|
(permission, d_revalidate, lookup, getxattr, getacl, ...).
|
|
|
|
config PERSISTENT_KEYRINGS
|
|
bool "Enable register of persistent per-UID keyrings"
|
|
depends on KEYS
|
|
help
|
|
This option provides a register of persistent per-UID keyrings,
|
|
primarily aimed at Kerberos key storage. The keyrings are persistent
|
|
in the sense that they stay around after all processes of that UID
|
|
have exited, not that they survive the machine being rebooted.
|
|
|
|
A particular keyring may be accessed by either the user whose keyring
|
|
it is or by a process with administrative privileges. The active
|
|
LSMs gets to rule on which admin-level processes get to access the
|
|
cache.
|
|
|
|
Keyrings are created and added into the register upon demand and get
|
|
removed if they expire (a default timeout is set upon creation).
|
|
|
|
config BIG_KEYS
|
|
bool "Large payload keys"
|
|
depends on KEYS
|
|
depends on TMPFS
|
|
select CRYPTO
|
|
select CRYPTO_AES
|
|
select CRYPTO_GCM
|
|
help
|
|
This option provides support for holding large keys within the kernel
|
|
(for example Kerberos ticket caches). The data may be stored out to
|
|
swapspace by tmpfs.
|
|
|
|
If you are unsure as to whether this is required, answer N.
|
|
|
|
config TRUSTED_KEYS
|
|
tristate "TRUSTED KEYS"
|
|
depends on KEYS && TCG_TPM
|
|
select CRYPTO
|
|
select CRYPTO_HMAC
|
|
select CRYPTO_SHA1
|
|
select CRYPTO_HASH_INFO
|
|
help
|
|
This option provides support for creating, sealing, and unsealing
|
|
keys in the kernel. Trusted keys are random number symmetric keys,
|
|
generated and RSA-sealed by the TPM. The TPM only unseals the keys,
|
|
if the boot PCRs and other criteria match. Userspace will only ever
|
|
see encrypted blobs.
|
|
|
|
If you are unsure as to whether this is required, answer N.
|
|
|
|
config ENCRYPTED_KEYS
|
|
tristate "ENCRYPTED KEYS"
|
|
depends on KEYS
|
|
select CRYPTO
|
|
select CRYPTO_HMAC
|
|
select CRYPTO_AES
|
|
select CRYPTO_CBC
|
|
select CRYPTO_SHA256
|
|
select CRYPTO_RNG
|
|
help
|
|
This option provides support for create/encrypting/decrypting keys
|
|
in the kernel. Encrypted keys are kernel generated random numbers,
|
|
which are encrypted/decrypted with a 'master' symmetric key. The
|
|
'master' key can be either a trusted-key or user-key type.
|
|
Userspace only ever sees/stores encrypted blobs.
|
|
|
|
If you are unsure as to whether this is required, answer N.
|
|
|
|
config KEY_DH_OPERATIONS
|
|
bool "Diffie-Hellman operations on retained keys"
|
|
depends on KEYS
|
|
select CRYPTO
|
|
select CRYPTO_HASH
|
|
select CRYPTO_DH
|
|
help
|
|
This option provides support for calculating Diffie-Hellman
|
|
public keys and shared secrets using values stored as keys
|
|
in the kernel.
|
|
|
|
If you are unsure as to whether this is required, answer N.
|