]> git.hungrycats.org Git - linux/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)
committerSasha Levin <alexander.levin@verizon.com>
Thu, 7 Dec 2017 02:20:08 +0000 (21:20 -0500)
[ Upstream commit 47b2c3fff4932e6fc17ce13d51a43c6969714e20 ]

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>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
arch/powerpc/Kconfig
arch/s390/Kconfig
arch/sparc/Kconfig
arch/x86/Kconfig
security/keys/Kconfig

index 190cc48abc0cc683b8d53e9f8460d67cbe93c671..4b8c928a9873182031b3c63acfce03a501fc080d 100644 (file)
@@ -1079,11 +1079,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 b06dc383926846c73e85a6c635ff0fac0a3ddcab..a37c902c123fbb584553d5f3c8922408e9514fa3 100644 (file)
@@ -338,9 +338,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 a1c2ecc4bec7b0cc0e5fef82267bf87324bb6c86..6fd39d987b0581a42cd925621c4863f8fa3f334e 100644 (file)
@@ -549,9 +549,6 @@ config SYSVIPC_COMPAT
        depends on COMPAT && SYSVIPC
        default y
 
-config KEYS_COMPAT
-       def_bool y if COMPAT && KEYS
-
 endmenu
 
 source "net/Kconfig"
index 226d5696e1d1dd5fe715124710b0f2cd04f8c495..a3d283addbdeda8bf3c27fe09219c3c9fa588adf 100644 (file)
@@ -2552,10 +2552,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 72483b8f1be5b058d7ca6001fb8e9877c4cf9a94..1edb37eea81d7f6b5282d9fcac6104cadd62c916 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