Skip to content

Commit 4370eff

Browse files
bamarnikkamagui
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]> Link: https://patchwork.kernel.org/patch/9565609/ (cherry picked from commit 47b2c3f) Tested-by: Seunghun Han <[email protected]>
1 parent 7d976fc commit 4370eff

File tree

5 files changed

+4
-15
lines changed

5 files changed

+4
-15
lines changed

arch/powerpc/Kconfig

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

10971097
source "security/Kconfig"
10981098

1099-
config KEYS_COMPAT
1100-
bool
1101-
depends on COMPAT && KEYS
1102-
default y
1103-
11041099
source "crypto/Kconfig"
11051100

11061101
config PPC_LIB_RHEAP

arch/s390/Kconfig

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -350,9 +350,6 @@ config COMPAT
350350
config SYSVIPC_COMPAT
351351
def_bool y if COMPAT && SYSVIPC
352352

353-
config KEYS_COMPAT
354-
def_bool y if COMPAT && KEYS
355-
356353
config SMP
357354
def_bool y
358355
prompt "Symmetric multi-processing support"

arch/sparc/Kconfig

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -544,9 +544,6 @@ config SYSVIPC_COMPAT
544544
depends on COMPAT && SYSVIPC
545545
default y
546546

547-
config KEYS_COMPAT
548-
def_bool y if COMPAT && KEYS
549-
550547
endmenu
551548

552549
source "net/Kconfig"

arch/x86/Kconfig

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2701,10 +2701,6 @@ config COMPAT_FOR_U64_ALIGNMENT
27012701
config SYSVIPC_COMPAT
27022702
def_bool y
27032703
depends on SYSVIPC
2704-
2705-
config KEYS_COMPAT
2706-
def_bool y
2707-
depends on KEYS
27082704
endif
27092705

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