lkml.org 
[lkml]   [2019]   [Nov]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [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

\
 
 \ /
  Last update: 2019-11-27 05:04    [W:1.443 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site