Re: [PATCH] riscv: fix syscall_get_arguments() and syscall_set_arguments()

From: Steven Rostedt
Date: Fri Mar 29 2019 - 16:32:12 EST


On Fri, 29 Mar 2019 21:11:09 +0300
"Dmitry V. Levin" <ldv@xxxxxxxxxxxx> wrote:

> On Fri, Mar 29, 2019 at 01:56:35PM -0400, Steven Rostedt wrote:
> > On Fri, 29 Mar 2019 18:52:18 +0100
> > David Abdurachmanov <david.abdurachmanov@xxxxxxxxx> wrote:
> >
> > > I have alternative version posted in December part of SECCOMP
> > > patchset which is based on arm64 implementation.
> > >
> > > http://lists.infradead.org/pipermail/linux-riscv/2018-December/002450.html
> > >
> > > I noticed that SECCOMP wasn't working properly if filters were
> > > checking syscall arguments, because populated arguments were wrong.
> > >
> > > Btw, I plan to send v2 of SECCOMP patchset soonish.
> >
> > Please do. I want to get my patch series out, which will require these
> > changes.
>
> Sorry, I haven't seen the alternative patch posted by David before.
> Apparently, besides fixing the bug it also introduces new sanity checks
> of "i" and "n" arguments in syscall_get_arguments() and
> syscall_set_arguments().
>
> Given that your patchset removes these arguments completely,
> I see little sense in adding new checks that are going to be removed
> by the subsequent commit in the series.

I agree. I'm going to pull in Dmitry's patches as my patches are going
to rewrite most the code anyway, and no need for the extra churn of the
sanity checks that are going to become irrelevant immediately afterward.

-- Steve