Hi,
On 9/28/22 09:20, Amit Kachhap wrote:
Hi,
On 9/27/22 16:24, Teo Couprie Diaz wrote:
ipc_parse_version is not used in 64-bit, only when in 32-bit compat. Change ARCH_WANT_COMPAT_IPC_PARSE_VERSION to be selected in COMPAT32 only.
Signed-off-by: Teo Couprie Diaz teo.coupriediaz@arm.com
arch/arm64/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index d402721ccad0..c784d8664a40 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -92,7 +92,7 @@ config ARM64 select ARCH_SUPPORTS_ATOMIC_RMW select ARCH_SUPPORTS_INT128 if CC_HAS_INT128 select ARCH_SUPPORTS_NUMA_BALANCING
- select ARCH_WANT_COMPAT_IPC_PARSE_VERSION if COMPAT
- select ARCH_WANT_COMPAT_IPC_PARSE_VERSION if COMPAT32 select ARCH_WANT_DEFAULT_BPF_JIT select ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT select ARCH_WANT_FRAME_POINTERS
After looking at the structures used by shmctl for passing arguments, the first 3 patches may not be needed. It does not have user pointers inside the structure so compat handler can be set to native handler. This 4th patch can be retained.
Thanks for the review Amit ! The structs don't contain any user pointers indeed, but as Kevin mentioned we elected to keep the compat handler. That allowed me to fix a few things along the way too.
--- a/arch/arm64/kernel/sys_compat64.c +++ b/arch/arm64/kernel/sys_compat64.c @@ -83,6 +83,14 @@ #define __arm64_compatentry_compat_sys_setitimer __arm64_compatentry_sys_setitimer #define __arm64_compatentry_compat_sys_getrusage __arm64_compatentry_sys_getrusage
+#define __arm64_compatentry_compat_sys_shmctl __arm64_compatentry_sys_shmctl
asmlinkage long sys_ni_syscall(void);
However that is good to know if I ever need to bypass the compat handler !
Thanks, Amit Daniel
Thanks, Téo IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.