Whamcloud - gitweb
LU-8602 gss: Properly port gss to newer crypto api. 09/28309/5
authorJames Simmons <uja.ornl@yahoo.com>
Tue, 1 Aug 2017 21:35:19 +0000 (17:35 -0400)
committerOleg Drokin <green@whamcloud.com>
Tue, 13 Nov 2018 06:16:19 +0000 (06:16 +0000)
commita21c13d4df4bea1bec0f5804136740ed53d5a57f
treeac3831115dabade407b0a4f0cf989d066ce41f68
parentca9300e53dc2b7bcaaa5482bb4234cce7d9a344e
LU-8602 gss: Properly port gss to newer crypto api.

In newer kernels the old crypto_hash_* was removed which
requires the gss layer to now user crypto_ahash_*. Pieces
of the port were done incorrectly which this patch addresses.
In the process cleanup some cases where data was leaked
in the case of the sg_tables.

Address the limitation of the gss keys in that they are hard
coded to u16 variables that are not guaranteed to be constant
and it will prove to be challenge in the future to add new crypto
algorithms.
Keep u16 representation of hash and crypto algorithms in Shared-Keys
as they are stored on disk, to not break compatibility with already
existing keys. But pass in to kernel space the name string
of the crypto algorithm we want to use.

Also deal with timer_setup and key.usage new format introduced in
newer kernels.

Test-Parameters: testlist=sanity-sec envdefinitions=SHARED_KEY=true
Change-Id: I90ef58104a1955ce12603173964a6878f60b601e
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-on: https://review.whamcloud.com/28309
Reviewed-by: John L. Hammond <jhammond@whamcloud.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 files changed:
libcfs/include/libcfs/libcfs_crypto.h
lustre/autoconf/lustre-core.m4
lustre/include/uapi/linux/lustre/lustre_user.h
lustre/ptlrpc/gss/gss_crypto.c
lustre/ptlrpc/gss/gss_crypto.h
lustre/ptlrpc/gss/gss_internal.h
lustre/ptlrpc/gss/gss_keyring.c
lustre/ptlrpc/gss/gss_krb5_mech.c
lustre/ptlrpc/gss/gss_sk_mech.c
lustre/utils/gss/lgss_sk.c
lustre/utils/gss/sk_utils.c
lustre/utils/gss/sk_utils.h