Re: [PATCH v2] x86/syscalls: Mark expected switch fall-throughs

From: Thomas Gleixner
Date: Tue Mar 26 2019 - 12:10:10 EST


On Tue, 26 Mar 2019, Oleg Nesterov wrote:
> On 03/23, Thomas Gleixner wrote:
> >
> > On Thu, 28 Feb 2019, Gustavo A. R. Silva wrote:
> >
> > > arch/x86/include/asm/syscall.h | 28 ++++++++++++++++++++++++++++
> > > 1 file changed, 28 insertions(+)
> >
> > Second thoughts. So this adds 28 /* fall through */ comments. Now I
> > appreciate the effort, but can we pretty please look at the code in
> > question and figure out whether the implementation makes sense in the first
> > place before adding falltrough comments blindly?
> >
> > The whole exercise can be simplified. Untested patch below.
> >
> > Looking at that stuff makes me wonder about two things:
> >
> > 1) The third argument of get/set(), i.e. the argument offset, is 0 on all
> > call sites. Do we need it at all?
>
> Probably "maxargs" can be removed too, Steven sent the patches a long ago, see
> https://lore.kernel.org/lkml/20161107212634.529267342@xxxxxxxxxxx/

Indeed. We should resurrect them.

> > 2) syscall_set_arguments() has been introduced in 2008 and we still have
> > no caller. Instead of polishing it, can it be removed completely or are
> > there plans to actually use it?
>
> I think it can die.

Good. Removed code is the least buggy code :)

Gustavo, it would be really appreciated if you could take care of that,
unless Steven wants to polish his old set up himself. If you have no
cycles, please let us know.

Thanks,

tglx