Re: [PATCH 1/3] arm64: ptrace: Add is_syscall_success to handle compat

2021-04-20 Thread He Zhe
On 4/19/21 8:19 PM, Will Deacon wrote: > On Fri, Apr 16, 2021 at 02:34:41PM +0100, Mark Rutland wrote: >> On Fri, Apr 16, 2021 at 01:33:22PM +0100, Catalin Marinas wrote: >>> On Fri, Apr 16, 2021 at 03:55:31PM +0800, He Zhe wrote: The general version of is_syscall_success does not handle 32

Re: [PATCH 1/3] arm64: ptrace: Add is_syscall_success to handle compat

2021-04-20 Thread He Zhe
On 4/16/21 8:33 PM, Catalin Marinas wrote: > On Fri, Apr 16, 2021 at 03:55:31PM +0800, He Zhe wrote: >> The general version of is_syscall_success does not handle 32-bit >> compatible case, which would cause 32-bit negative return code to be >> recoganized as a positive number later and seen as a

Re: [PATCH 1/3] arm64: ptrace: Add is_syscall_success to handle compat

2021-04-19 Thread Will Deacon
On Fri, Apr 16, 2021 at 02:34:41PM +0100, Mark Rutland wrote: > On Fri, Apr 16, 2021 at 01:33:22PM +0100, Catalin Marinas wrote: > > On Fri, Apr 16, 2021 at 03:55:31PM +0800, He Zhe wrote: > > > The general version of is_syscall_success does not handle 32-bit > > > compatible case, which would caus

RE: [PATCH 1/3] arm64: ptrace: Add is_syscall_success to handle compat

2021-04-17 Thread David Laight
From: Mark Rutland > Sent: 16 April 2021 14:35 .. > @@ -51,13 +48,7 @@ static inline void syscall_set_return_value(struct > task_struct *task, > struct pt_regs *regs, > int error, long val) > { > - if (error)

Re: [PATCH 1/3] arm64: ptrace: Add is_syscall_success to handle compat

2021-04-16 Thread Mark Rutland
On Fri, Apr 16, 2021 at 01:33:22PM +0100, Catalin Marinas wrote: > On Fri, Apr 16, 2021 at 03:55:31PM +0800, He Zhe wrote: > > The general version of is_syscall_success does not handle 32-bit > > compatible case, which would cause 32-bit negative return code to be > > recoganized as a positive numb

Re: [PATCH 1/3] arm64: ptrace: Add is_syscall_success to handle compat

2021-04-16 Thread Catalin Marinas
On Fri, Apr 16, 2021 at 03:55:31PM +0800, He Zhe wrote: > The general version of is_syscall_success does not handle 32-bit > compatible case, which would cause 32-bit negative return code to be > recoganized as a positive number later and seen as a "success". > > Since is_compat_thread is defined