Skip to content

Commit c8f1391

Browse files
bamarnigregkh
authored andcommitted
security/keys: add CONFIG_KEYS_COMPAT to Kconfig
commit 47b2c3fff4932e6fc17ce13d51a43c6969714e20 upstream. 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> Cc: James Cowgill <james.cowgill@mips.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 11fa335 commit c8f1391

5 files changed

Lines changed: 4 additions & 15 deletions

File tree

arch/powerpc/Kconfig

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1082,11 +1082,6 @@ source "arch/powerpc/Kconfig.debug"
10821082

10831083
source "security/Kconfig"
10841084

1085-
config KEYS_COMPAT
1086-
bool
1087-
depends on COMPAT && KEYS
1088-
default y
1089-
10901085
source "crypto/Kconfig"
10911086

10921087
config PPC_LIB_RHEAP

arch/s390/Kconfig

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -346,9 +346,6 @@ config COMPAT
346346
config SYSVIPC_COMPAT
347347
def_bool y if COMPAT && SYSVIPC
348348

349-
config KEYS_COMPAT
350-
def_bool y if COMPAT && KEYS
351-
352349
config SMP
353350
def_bool y
354351
prompt "Symmetric multi-processing support"

arch/sparc/Kconfig

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -549,9 +549,6 @@ config SYSVIPC_COMPAT
549549
depends on COMPAT && SYSVIPC
550550
default y
551551

552-
config KEYS_COMPAT
553-
def_bool y if COMPAT && KEYS
554-
555552
endmenu
556553

557554
source "net/Kconfig"

arch/x86/Kconfig

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2641,10 +2641,6 @@ config COMPAT_FOR_U64_ALIGNMENT
26412641
config SYSVIPC_COMPAT
26422642
def_bool y
26432643
depends on SYSVIPC
2644-
2645-
config KEYS_COMPAT
2646-
def_bool y
2647-
depends on KEYS
26482644
endif
26492645

26502646
endmenu

security/keys/Kconfig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ config KEYS
2020

2121
If you are unsure as to whether this is required, answer N.
2222

23+
config KEYS_COMPAT
24+
def_bool y
25+
depends on COMPAT && KEYS
26+
2327
config PERSISTENT_KEYRINGS
2428
bool "Enable register of persistent per-UID keyrings"
2529
depends on KEYS

0 commit comments

Comments
 (0)