]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
keys: Kill off request_key_async{,_with_auxdata}
authorDavid Howells <dhowells@redhat.com>
Wed, 19 Jun 2019 15:10:16 +0000 (16:10 +0100)
committerDavid Howells <dhowells@redhat.com>
Wed, 26 Jun 2019 19:58:13 +0000 (20:58 +0100)
Kill off request_key_async{,_with_auxdata}() as they're not currently used.

Signed-off-by: David Howells <dhowells@redhat.com>
Documentation/security/keys/core.rst
Documentation/security/keys/request-key.rst
include/linux/key.h
security/keys/request_key.c

index 003f1452a5b79f0b78d138a012aad71a32fefc7c..a0e245f9576f76993214c09222391747f7c5122b 100644 (file)
@@ -1115,38 +1115,6 @@ payload contents" for more information.
     is a blob of length callout_len, if given (the length may be 0).
 
 
- *  A key can be requested asynchronously by calling one of::
-
-       struct key *request_key_async(const struct key_type *type,
-                                     const char *description,
-                                     const void *callout_info,
-                                     size_t callout_len);
-
-    or::
-
-       struct key *request_key_async_with_auxdata(const struct key_type *type,
-                                                  const char *description,
-                                                  const char *callout_info,
-                                                  size_t callout_len,
-                                                  void *aux);
-
-    which are asynchronous equivalents of request_key() and
-    request_key_with_auxdata() respectively.
-
-    These two functions return with the key potentially still under
-    construction.  To wait for construction completion, the following should be
-    called::
-
-       int wait_for_key_construction(struct key *key, bool intr);
-
-    The function will wait for the key to finish being constructed and then
-    invokes key_validate() to return an appropriate value to indicate the state
-    of the key (0 indicates the key is usable).
-
-    If intr is true, then the wait can be interrupted by a signal, in which
-    case error ERESTARTSYS will be returned.
-
-
  *  To search for a key under RCU conditions, call::
 
        struct key *request_key_rcu(const struct key_type *type,
index 45049abdf29043c962d13d0f80251c3087b3793f..5a210baa583a0900b0c0dfbf113bdce128f5e7dd 100644 (file)
@@ -21,21 +21,6 @@ or::
                                             size_t callout_len,
                                             void *aux);
 
-or::
-
-       struct key *request_key_async(const struct key_type *type,
-                                     const char *description,
-                                     const char *callout_info,
-                                     size_t callout_len);
-
-or::
-
-       struct key *request_key_async_with_auxdata(const struct key_type *type,
-                                                  const char *description,
-                                                  const char *callout_info,
-                                                  size_t callout_len,
-                                                  void *aux);
-
 or::
 
        struct key *request_key_rcu(const struct key_type *type,
@@ -53,15 +38,11 @@ does not need to link the key to a keyring to prevent it from being immediately
 destroyed.  The kernel interface returns a pointer directly to the key, and
 it's up to the caller to destroy the key.
 
-The request_key*_with_auxdata() calls are like the in-kernel request_key*()
-calls, except that they permit auxiliary data to be passed to the upcaller (the
+The request_key_with_auxdata() calls is like the in-kernel request_key() call,
+except that they permit auxiliary data to be passed to the upcaller (the
 default is NULL).  This is only useful for those key types that define their
 own upcall mechanism rather than using /sbin/request-key.
 
-The two async in-kernel calls may return keys that are still in the process of
-being constructed.  The two non-async ones will wait for construction to
-complete first.
-
 The request_key_rcu() call is like the in-kernel request_key() call, except
 that it doesn't check for keys that are under construction and doesn't attempt
 to construct missing keys.
index 3604a554df99851c43601a2a63a8b455c4a21f96..4cd5669184f375cff6e9ebfda9b2efff275b9e94 100644 (file)
@@ -283,17 +283,6 @@ extern struct key *request_key_with_auxdata(struct key_type *type,
                                            size_t callout_len,
                                            void *aux);
 
-extern struct key *request_key_async(struct key_type *type,
-                                    const char *description,
-                                    const void *callout_info,
-                                    size_t callout_len);
-
-extern struct key *request_key_async_with_auxdata(struct key_type *type,
-                                                 const char *description,
-                                                 const void *callout_info,
-                                                 size_t callout_len,
-                                                 void *aux);
-
 extern int wait_for_key_construction(struct key *key, bool intr);
 
 extern int key_validate(const struct key *key);
index f289982cb5db9670a476e278a7278a7547afebd3..36c55ef47b9ee1c853bd6a50bb4f844271017520 100644 (file)
@@ -739,56 +739,6 @@ struct key *request_key_with_auxdata(struct key_type *type,
 }
 EXPORT_SYMBOL(request_key_with_auxdata);
 
-/*
- * request_key_async - Request a key (allow async construction)
- * @type: Type of key.
- * @description: The searchable description of the key.
- * @callout_info: The data to pass to the instantiation upcall (or NULL).
- * @callout_len: The length of callout_info.
- *
- * As for request_key_and_link() except that it does not add the returned key
- * to a keyring if found, new keys are always allocated in the user's quota and
- * no auxiliary data can be passed.
- *
- * The caller should call wait_for_key_construction() to wait for the
- * completion of the returned key if it is still undergoing construction.
- */
-struct key *request_key_async(struct key_type *type,
-                             const char *description,
-                             const void *callout_info,
-                             size_t callout_len)
-{
-       return request_key_and_link(type, description, callout_info,
-                                   callout_len, NULL, NULL,
-                                   KEY_ALLOC_IN_QUOTA);
-}
-EXPORT_SYMBOL(request_key_async);
-
-/*
- * request a key with auxiliary data for the upcaller (allow async construction)
- * @type: Type of key.
- * @description: The searchable description of the key.
- * @callout_info: The data to pass to the instantiation upcall (or NULL).
- * @callout_len: The length of callout_info.
- * @aux: Auxiliary data for the upcall.
- *
- * As for request_key_and_link() except that it does not add the returned key
- * to a keyring if found and new keys are always allocated in the user's quota.
- *
- * The caller should call wait_for_key_construction() to wait for the
- * completion of the returned key if it is still undergoing construction.
- */
-struct key *request_key_async_with_auxdata(struct key_type *type,
-                                          const char *description,
-                                          const void *callout_info,
-                                          size_t callout_len,
-                                          void *aux)
-{
-       return request_key_and_link(type, description, callout_info,
-                                   callout_len, aux, NULL, KEY_ALLOC_IN_QUOTA);
-}
-EXPORT_SYMBOL(request_key_async_with_auxdata);
-
 /**
  * request_key_rcu - Request key from RCU-read-locked context
  * @type: The type of key we want.