Skip to content

Commit

Permalink
s390/pkey: Load pkey kernel module automatically
Browse files Browse the repository at this point in the history
With the recent enhancements of the pkey kernel module,
the pkey kernel module should be loaded automatically
during system startup, if MSA is available.

When used for swap device encryption with random protected
keys, pkey must be loaded before /etc/crypttab is processed,
otherwise the sysfs attributes to read the key from are
not available.

Signed-off-by: Ingo Franzki <ifranzki@linux.ibm.com>
Reviewed-by: Hendrik Brueckner <brueckner@linux.ibm.com>
Reviewed-by: Harald Freudenberger <freude@linux.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
  • Loading branch information
Ingo Franzki authored and Martin Schwidefsky committed Oct 19, 2018
1 parent ec0c0bb commit 63c19be
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/s390/crypto/pkey_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include <linux/kallsyms.h>
#include <linux/debugfs.h>
#include <linux/random.h>
#include <linux/cpufeature.h>
#include <asm/zcrypt.h>
#include <asm/cpacf.h>
#include <asm/pkey.h>
Expand Down Expand Up @@ -1704,5 +1705,5 @@ static void __exit pkey_exit(void)
pkey_debug_exit();
}

module_init(pkey_init);
module_cpu_feature_match(MSA, pkey_init);
module_exit(pkey_exit);

0 comments on commit 63c19be

Please sign in to comment.