]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
security/keys: add CONFIG_KEYS_COMPAT to Kconfig
authorBilal Amarni <bilal.amarni@gmail.com>
Thu, 8 Jun 2017 13:47:26 +0000 (14:47 +0100)
committerJames Morris <james.l.morris@oracle.com>
Fri, 9 Jun 2017 03:29:45 +0000 (13:29 +1000)
CONFIG_KEYS_COMPAT is defined in arch-specific Kconfigs and is missing for
several 64-bit architectures : mips, parisc, tile.

At the moment and for those architectures, calling in 32-bit userspace the
keyctl syscall would return an ENOSYS error.

This patch moves the CONFIG_KEYS_COMPAT option to security/keys/Kconfig, to
make sure the compatibility wrapper is registered by default for any 64-bit
architecture as long as it is configured with CONFIG_COMPAT.

[DH: Modified to remove arm64 compat enablement also as requested by Eric
 Biggers]

Signed-off-by: Bilal Amarni <bilal.amarni@gmail.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
cc: Eric Biggers <ebiggers3@gmail.com>
Signed-off-by: James Morris <james.l.morris@oracle.com>
arch/arm64/Kconfig
arch/powerpc/Kconfig
arch/s390/Kconfig
arch/sparc/Kconfig
arch/x86/Kconfig
security/keys/Kconfig

index 3dcd7ec69bca8f939dba09e9087902fbd1561e8a..b2024db225a9dd116cf5d2ba49d62bc79c8e0bf8 100644 (file)
@@ -1084,10 +1084,6 @@ config SYSVIPC_COMPAT
        def_bool y
        depends on COMPAT && SYSVIPC
 
-config KEYS_COMPAT
-       def_bool y
-       depends on COMPAT && KEYS
-
 endmenu
 
 menu "Power management options"
index f7c8f9972f618109209e4892512ed903f6b865f3..83d2e0f43c2628b5dc25d561085b58d8023f58b1 100644 (file)
@@ -1215,11 +1215,6 @@ source "arch/powerpc/Kconfig.debug"
 
 source "security/Kconfig"
 
-config KEYS_COMPAT
-       bool
-       depends on COMPAT && KEYS
-       default y
-
 source "crypto/Kconfig"
 
 config PPC_LIB_RHEAP
index e161fafb495b746f94d84a172b27708a1ce77816..6967addc6a8940630bf3038abdad18d37d8bda39 100644 (file)
@@ -363,9 +363,6 @@ config COMPAT
 config SYSVIPC_COMPAT
        def_bool y if COMPAT && SYSVIPC
 
-config KEYS_COMPAT
-       def_bool y if COMPAT && KEYS
-
 config SMP
        def_bool y
        prompt "Symmetric multi-processing support"
index b558c9e29de37f3ebeb18593c1a3d234c7d9d060..5639c9fe5b5522d6e7b7d05ac17a6f07d579cc0c 100644 (file)
@@ -577,9 +577,6 @@ config SYSVIPC_COMPAT
        depends on COMPAT && SYSVIPC
        default y
 
-config KEYS_COMPAT
-       def_bool y if COMPAT && KEYS
-
 endmenu
 
 source "net/Kconfig"
index 4ccfacc7232ab1ace21b8466ae73e4c7d18d3fba..0efb4c9497bce7e491665688840c4ced8e2c66c6 100644 (file)
@@ -2776,10 +2776,6 @@ config COMPAT_FOR_U64_ALIGNMENT
 config SYSVIPC_COMPAT
        def_bool y
        depends on SYSVIPC
-
-config KEYS_COMPAT
-       def_bool y
-       depends on KEYS
 endif
 
 endmenu
index 6fd95f76bfaeaf4a300219ee290048c3913632a5..00b7431a8aeb044c96c0460082b7388611048f83 100644 (file)
@@ -20,6 +20,10 @@ config KEYS
 
          If you are unsure as to whether this is required, answer N.
 
+config KEYS_COMPAT
+       def_bool y
+       depends on COMPAT && KEYS
+
 config PERSISTENT_KEYRINGS
        bool "Enable register of persistent per-UID keyrings"
        depends on KEYS