Messages in this thread | | | From | Linus Torvalds <> | Date | Tue, 26 Nov 2019 20:04:08 -0800 | Subject | Re: [PATCH] ptrace/x86: introduce TS_COMPAT_RESTART to fix get_nr_restart_syscall() |
| |
On Tue, Nov 26, 2019 at 3:08 AM Oleg Nesterov <oleg@redhat.com> wrote: > > Alternatively we could add ->compat_restart into struct restart_block, > logically this is the same thing.
That sounds like the better model to me. That's what the restart_block is about: it's supposed to contain the restart information.
I'd much rather see the system call number added into the restart block (or just the "compat bit" - but we have that X32 case too, so why not put it all there). And then the get_nr_restart_syscall() hack goes away and is just "set state from the restart block".
How painful would that be? I guess right now we always just set all the restart_block info manually in all the restart cases, and that could make it a bit painful to add this kind of architecture-specific flag, but it _sounds_ conceptually like the right thing to do.
I definitely don't love the "magic sticky bit in thread status" field model.
Linus
| |