Messages in this thread | | | From | Andy Lutomirski <> | Date | Thu, 28 Nov 2019 13:13:34 -0800 | Subject | Re: [PATCH] ptrace/x86: introduce TS_COMPAT_RESTART to fix get_nr_restart_syscall() |
| |
>> On Nov 28, 2019, at 11:25 AM, Linus Torvalds <torvalds@linux-foundation.org> wrote: >> >> On Thu, Nov 28, 2019 at 7:36 AM Oleg Nesterov <oleg@redhat.com> wrote: >> You misunderstood my question, I do not see a good place for the code >> above. So I am going to uglify */signal.[ch] files. > > Ahh, ok, I thought that was kind of understood. > >> --- a/arch/x86/include/asm/signal.h >> +++ b/arch/x86/include/asm/signal.h >> @@ -5,6 +5,10 @@ >> #ifndef __ASSEMBLY__ >> #include <linux/linkage.h> >> +struct restart_block; >> +extern void arch_set_restart_data(struct restart_block *); >> +#define arch_set_restart_data arch_set_restart_data > > I'd just replace this with > > /* We need to save TS_COMPAT at the time of the call */ > #define arch_set_restart_data(blk) (blk)->arch_data = > current_thread_info()->status > > or something like that.
I think this doesn’t work for x32. Let’s either save the result of syscall_get_arch() or just actually calculate and save the restart_syscall nr here.
Before we commit to this, Kees, do you think we can manage to just renumber restart_syscall()? That’s a much better solution if we can pull it off.
> > Linus
| |