summaryrefslogtreecommitdiffstats
path: root/include/crypto
diff options
context:
space:
mode:
authorOndrej Mosnacek <omosnace@redhat.com>2019-07-09 13:11:24 +0200
committerHerbert Xu <herbert@gondor.apana.org.au>2019-07-26 14:08:02 +0200
commit91b05a7e7d8033a90a64f5fc0e3808db423e420a (patch)
treeb883a067a751829e504a48127b80546e8e22efc6 /include/crypto
parentcrypto: inside-secure -reduce hash byte counters to 64 bits (diff)
downloadlinux-91b05a7e7d8033a90a64f5fc0e3808db423e420a.tar.xz
linux-91b05a7e7d8033a90a64f5fc0e3808db423e420a.zip
crypto: user - make NETLINK_CRYPTO work inside netns
Currently, NETLINK_CRYPTO works only in the init network namespace. It doesn't make much sense to cut it out of the other network namespaces, so do the minor plumbing work necessary to make it work in any network namespace. Code inspired by net/core/sock_diag.c. Tested using kcapi-dgst from libkcapi [1]: Before: # unshare -n kcapi-dgst -c sha256 </dev/null | wc -c libkcapi - Error: Netlink error: sendmsg failed libkcapi - Error: Netlink error: sendmsg failed libkcapi - Error: NETLINK_CRYPTO: cannot obtain cipher information for hmac(sha512) (is required crypto_user.c patch missing? see documentation) 0 After: # unshare -n kcapi-dgst -c sha256 </dev/null | wc -c 32 [1] https://github.com/smuellerDD/libkcapi Signed-off-by: Ondrej Mosnacek <omosnace@redhat.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'include/crypto')
-rw-r--r--include/crypto/internal/cryptouser.h2
1 files changed, 0 insertions, 2 deletions
diff --git a/include/crypto/internal/cryptouser.h b/include/crypto/internal/cryptouser.h
index 8c602b187c58..40623f4457df 100644
--- a/include/crypto/internal/cryptouser.h
+++ b/include/crypto/internal/cryptouser.h
@@ -1,8 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0 */
#include <net/netlink.h>
-extern struct sock *crypto_nlsk;
-
struct crypto_alg *crypto_alg_match(struct crypto_user_alg *p, int exact);
#ifdef CONFIG_CRYPTO_STATS