[PATCH v6 19/25] powerpc: Remove high-order word clearing on compat syscall entry

Nicholas Piggin npiggin at gmail.com
Fri Sep 23 17:40:38 AEST 2022


On Wed Sep 21, 2022 at 4:55 PM AEST, Rohan McLure wrote:
> Remove explicit clearing of the high order-word of user parameters when
> handling compatibility syscalls in system_call_exception. The
> COMPAT_SYSCALL_DEFINEx macros handle this clearing through an
> explicit cast to the signature type of the target handler.
>
> Signed-off-by: Rohan McLure <rmclure at linux.ibm.com>
> Reported-by: Nicholas Piggin <npiggin at gmail.com>

Thanks for digging through it to make sure things will work right
without this. Some handlers look problematic without the rest of your
series, right? e.g., upstream compat_sys_mmap2 has long arguments.

Reviewed-by: Nicholas Piggin <npiggin at gmail.com>

> ---
> V6: New patch
> ---
>  arch/powerpc/kernel/syscall.c | 8 --------
>  1 file changed, 8 deletions(-)
>
> diff --git a/arch/powerpc/kernel/syscall.c b/arch/powerpc/kernel/syscall.c
> index 9875486f6168..15af0ed019a7 100644
> --- a/arch/powerpc/kernel/syscall.c
> +++ b/arch/powerpc/kernel/syscall.c
> @@ -157,14 +157,6 @@ notrace long system_call_exception(long r3, long r4, long r5,
>  
>  	if (unlikely(is_compat_task())) {
>  		f = (void *)compat_sys_call_table[r0];
> -
> -		r3 &= 0x00000000ffffffffULL;
> -		r4 &= 0x00000000ffffffffULL;
> -		r5 &= 0x00000000ffffffffULL;
> -		r6 &= 0x00000000ffffffffULL;
> -		r7 &= 0x00000000ffffffffULL;
> -		r8 &= 0x00000000ffffffffULL;
> -
>  	} else {
>  		f = (void *)sys_call_table[r0];
>  	}
> -- 
> 2.34.1



More information about the Linuxppc-dev mailing list