Skip to content

Commit 47b2c3f

Browse files
bamarniJames Morris
authored andcommitted
security/keys: add CONFIG_KEYS_COMPAT to Kconfig
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 <[email protected]> Signed-off-by: David Howells <[email protected]> Reviewed-by: Arnd Bergmann <[email protected]> cc: Eric Biggers <[email protected]> Signed-off-by: James Morris <[email protected]>
1 parent aea4156 commit 47b2c3f

File tree

6 files changed

+4
-19
lines changed

6 files changed

+4
-19
lines changed

arch/arm64/Kconfig

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1084,10 +1084,6 @@ config SYSVIPC_COMPAT
10841084
def_bool y
10851085
depends on COMPAT && SYSVIPC
10861086

1087-
config KEYS_COMPAT
1088-
def_bool y
1089-
depends on COMPAT && KEYS
1090-
10911087
endmenu
10921088

10931089
menu "Power management options"

arch/powerpc/Kconfig

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

12161216
source "security/Kconfig"
12171217

1218-
config KEYS_COMPAT
1219-
bool
1220-
depends on COMPAT && KEYS
1221-
default y
1222-
12231218
source "crypto/Kconfig"
12241219

12251220
config PPC_LIB_RHEAP

arch/s390/Kconfig

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -363,9 +363,6 @@ config COMPAT
363363
config SYSVIPC_COMPAT
364364
def_bool y if COMPAT && SYSVIPC
365365

366-
config KEYS_COMPAT
367-
def_bool y if COMPAT && KEYS
368-
369366
config SMP
370367
def_bool y
371368
prompt "Symmetric multi-processing support"

arch/sparc/Kconfig

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -577,9 +577,6 @@ config SYSVIPC_COMPAT
577577
depends on COMPAT && SYSVIPC
578578
default y
579579

580-
config KEYS_COMPAT
581-
def_bool y if COMPAT && KEYS
582-
583580
endmenu
584581

585582
source "net/Kconfig"

arch/x86/Kconfig

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2776,10 +2776,6 @@ config COMPAT_FOR_U64_ALIGNMENT
27762776
config SYSVIPC_COMPAT
27772777
def_bool y
27782778
depends on SYSVIPC
2779-
2780-
config KEYS_COMPAT
2781-
def_bool y
2782-
depends on KEYS
27832779
endif
27842780

27852781
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)