Skip to content

Commit 601f009

Browse files
ebiggersJarkko Sakkinen
authored andcommitted
KEYS: remove CONFIG_KEYS_COMPAT
KEYS_COMPAT now always takes the value of COMPAT && KEYS. But the security/keys/ directory is only compiled if KEYS is enabled, so in practice KEYS_COMPAT is the same as COMPAT. Therefore, remove the unnecessary KEYS_COMPAT and just use COMPAT directly. (Also remove an outdated comment from compat.c.) Reviewed-by: James Morris <[email protected]> Signed-off-by: Eric Biggers <[email protected]> Reviewed-by: Jarkko Sakkinen <[email protected]> Tested-by: Jarkko Sakkinen <[email protected]> Signed-off-by: Jarkko Sakkinen <[email protected]>
1 parent 37d4e84 commit 601f009

File tree

4 files changed

+3
-12
lines changed

4 files changed

+3
-12
lines changed

security/keys/Kconfig

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

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

24-
config KEYS_COMPAT
25-
def_bool y
26-
depends on COMPAT && KEYS
27-
2824
config KEYS_REQUEST_CACHE
2925
bool "Enable temporary caching of the last request_key() result"
3026
depends on KEYS

security/keys/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ obj-y := \
1717
request_key_auth.o \
1818
user_defined.o
1919
compat-obj-$(CONFIG_KEY_DH_OPERATIONS) += compat_dh.o
20-
obj-$(CONFIG_KEYS_COMPAT) += compat.o $(compat-obj-y)
20+
obj-$(CONFIG_COMPAT) += compat.o $(compat-obj-y)
2121
obj-$(CONFIG_PROC_FS) += proc.o
2222
obj-$(CONFIG_SYSCTL) += sysctl.o
2323
obj-$(CONFIG_PERSISTENT_KEYRINGS) += persistent.o

security/keys/compat.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,6 @@ static long compat_keyctl_instantiate_key_iov(
4646

4747
/*
4848
* The key control system call, 32-bit compatibility version for 64-bit archs
49-
*
50-
* This should only be called if the 64-bit arch uses weird pointers in 32-bit
51-
* mode or doesn't guarantee that the top 32-bits of the argument registers on
52-
* taking a 32-bit syscall are zero. If you can, you should call sys_keyctl()
53-
* directly.
5449
*/
5550
COMPAT_SYSCALL_DEFINE5(keyctl, u32, option,
5651
u32, arg2, u32, arg3, u32, arg4, u32, arg5)

security/keys/internal.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ extern long keyctl_dh_compute(struct keyctl_dh_params __user *, char __user *,
264264
size_t, struct keyctl_kdf_params __user *);
265265
extern long __keyctl_dh_compute(struct keyctl_dh_params __user *, char __user *,
266266
size_t, struct keyctl_kdf_params *);
267-
#ifdef CONFIG_KEYS_COMPAT
267+
#ifdef CONFIG_COMPAT
268268
extern long compat_keyctl_dh_compute(struct keyctl_dh_params __user *params,
269269
char __user *buffer, size_t buflen,
270270
struct compat_keyctl_kdf_params __user *kdf);
@@ -279,7 +279,7 @@ static inline long keyctl_dh_compute(struct keyctl_dh_params __user *params,
279279
return -EOPNOTSUPP;
280280
}
281281

282-
#ifdef CONFIG_KEYS_COMPAT
282+
#ifdef CONFIG_COMPAT
283283
static inline long compat_keyctl_dh_compute(
284284
struct keyctl_dh_params __user *params,
285285
char __user *buffer, size_t buflen,

0 commit comments

Comments
 (0)