summaryrefslogtreecommitdiffstats
path: root/drivers/s390/crypto
diff options
context:
space:
mode:
authorIngo Franzki <ifranzki@linux.ibm.com>2018-10-17 17:24:43 +0200
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2018-10-19 08:18:18 +0200
commit63c19be095d0f8eb8992674991e44b4228bd4179 (patch)
tree5aa623d79110d6d89cd4deeaa7f60989d17a4b00 /drivers/s390/crypto
parentec0c0bb489727de0d4dca6a00be6970ab8a3b30a (diff)
downloadblackbird-obmc-linux-63c19be095d0f8eb8992674991e44b4228bd4179.tar.gz
blackbird-obmc-linux-63c19be095d0f8eb8992674991e44b4228bd4179.zip
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: 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>
Diffstat (limited to 'drivers/s390/crypto')
-rw-r--r--drivers/s390/crypto/pkey_api.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/s390/crypto/pkey_api.c b/drivers/s390/crypto/pkey_api.c
index 683ff72ae977..86a8799475e9 100644
--- a/drivers/s390/crypto/pkey_api.c
+++ b/drivers/s390/crypto/pkey_api.c
@@ -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>
@@ -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);
OpenPOWER on IntegriCloud