[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190726123251.GA8274@gondor.apana.org.au>
Date: Fri, 26 Jul 2019 22:32:51 +1000
From: Herbert Xu <herbert@...dor.apana.org.au>
To: Ondrej Mosnacek <omosnace@...hat.com>
Cc: linux-crypto@...r.kernel.org, netdev@...r.kernel.org,
davem@...emloft.net, smueller@...onox.de,
steffen.klassert@...unet.com, dzickus@...hat.com
Subject: Re: [PATCH] crypto: user - make NETLINK_CRYPTO work inside netns
Ondrej Mosnacek <omosnace@...hat.com> wrote:
> 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@...hat.com>
> ---
> crypto/crypto_user_base.c | 37 +++++++++++++++++++---------
> crypto/crypto_user_stat.c | 4 ++-
> include/crypto/internal/cryptouser.h | 2 --
> include/net/net_namespace.h | 3 +++
> 4 files changed, 31 insertions(+), 15 deletions(-)
Patch applied. Thanks.
--
Email: Herbert Xu <herbert@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Powered by blists - more mailing lists