Re: [PATCH v2 0/4] x86: fix get_nr_restart_syscall()

From: Andy Lutomirski
Date: Wed Dec 18 2019 - 21:48:39 EST


On Wed, Dec 18, 2019 at 12:02 PM Linus Torvalds
<torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:
>
> On Wed, Dec 18, 2019 at 7:19 AM Oleg Nesterov <oleg@xxxxxxxxxx> wrote:
> >
> > Andy, Linus, do you have any objections?
>
> It's ok by me, no objections. I still don't love your "hide the bit in
> thread flags over return to user space", and would still prefer it in
> the restart block, but I don't care _that_ deeply.
>

I'd rather stick it in restart_block. I'd also like to see the kernel
*verify* that the variant of restart_syscall() that's invoked is the
same as the variant that should be invoked. In my mind, very few
syscalls say "I can't believe there are no major bugs in here" like
restart_syscall(), and being conservative is nice.