Commit 63c19be0 authored by Ingo Franzki's avatar Ingo Franzki Committed by Martin Schwidefsky

s390/pkey: Load pkey kernel module automatically

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: default avatarIngo Franzki <ifranzki@linux.ibm.com>
Reviewed-by: default avatarHendrik Brueckner <brueckner@linux.ibm.com>
Reviewed-by: default avatarHarald Freudenberger <freude@linux.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent ec0c0bb4
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
#include <linux/kallsyms.h> #include <linux/kallsyms.h>
#include <linux/debugfs.h> #include <linux/debugfs.h>
#include <linux/random.h> #include <linux/random.h>
#include <linux/cpufeature.h>
#include <asm/zcrypt.h> #include <asm/zcrypt.h>
#include <asm/cpacf.h> #include <asm/cpacf.h>
#include <asm/pkey.h> #include <asm/pkey.h>
...@@ -1704,5 +1705,5 @@ static void __exit pkey_exit(void) ...@@ -1704,5 +1705,5 @@ static void __exit pkey_exit(void)
pkey_debug_exit(); pkey_debug_exit();
} }
module_init(pkey_init); module_cpu_feature_match(MSA, pkey_init);
module_exit(pkey_exit); module_exit(pkey_exit);
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment