Re: [RFC PATCH 5/8] s390: Remove compat support
From: Arnd Bergmann
Date: Mon Nov 10 2025 - 16:36:12 EST
On Mon, Nov 10, 2025, at 19:54, Heiko Carstens wrote:
> diff --git a/arch/s390/configs/compat.config b/arch/s390/configs/compat.config
> deleted file mode 100644
> index 6fd051453ae8..000000000000
> --- a/arch/s390/configs/compat.config
> +++ /dev/null
> @@ -1,3 +0,0 @@
> -# Help: Enable compat support
> -CONFIG_COMPAT=y
> -CONFIG_COMPAT_32BIT_TIME=y
I think you missed a reference to this file at
tools/testing/selftests/nolibc/Makefile.nolibc:DEFCONFIG_s390 = defconfig compat.config
> -/*
> - * A pointer passed in from user mode. This should not
> - * be used for syscall parameters, just declare them
> - * as pointers because the syscall entry code will have
> - * appropriately converted them already.
> - */
> -
> -static inline void __user *compat_ptr(compat_uptr_t uptr)
> -{
> - return (void __user *)(unsigned long)(uptr & 0x7fffffffUL);
> -}
> -#define compat_ptr(uptr) compat_ptr(uptr)
This opens an interesting question: since compat_ptr() now doesn't
do anything interesting any more, do we still require drivers to
use it for correctness, or do we stop using it?
The cheri/morello code was repurposed compat_ptr() to support
both 64-bit and 128-bit pointers in userland, and that has a chance
of coming back in the future, but that's not getting merged and it
isn't clear if any other 128-bit pointer support in the future would
need a similar trick.
Arnd