[PATCH RFC 0/9] filter_seccomp: new bpf generation strategies

Paul Chaignon paul.chaignon at gmail.com
Sat Oct 26 07:01:22 UTC 2019


On Fri, Oct 25, 2019 at 11:18:29PM +0300, Dmitry V. Levin wrote:
> Hi,
> 
> On Wed, Oct 16, 2019 at 05:38:43PM +0200, Paul Chaignon wrote:
> > Hi all,
> > 
> > On Fri, Aug 23, 2019 at 11:42 AM Paul Chaignon <paul.chaignon at gmail.com> 
> > wrote:
> > 
> > [...]
> > 
> > > x86-64:
> > >                 best    lin.    rev.    bin.
> > > none            lin.    36      47      84
> > > ptrace          lin.    39      51      88
> > > !ptrace         rev.    32      23      66
> > > %desc           bin.    239     274     172
> > > %file           bin.    173     213     172
> > > %fstat          lin.    44      63      107
> > > %ipc            lin.    49      63      111
> > > !%ipc           rev.    42      33      87
> > > %lstat          lin.    41      57      96
> > > %memory,%ipc,%pure,%signal,%network     bin.    193     246     176

[...]

> > I'm preparing to send a rebased v2 for this patchset.  Given the above
> > numbers, I will likely drop the reverse linear strategy (patch 7/9) and
> 
> Why do you suggest to drop the reverse linear strategy?
> It wins over the current linear strategy sometimes, and
> its implementation is similar to the linear strategy.

It does win over the linear strategy in a few cases, but only by a small
amount and only in cases for which the linear strategy is already
performing well.  Thus, I thought it wasn't worth it.  Even if it adds
little complexity to the code, it does require generating an additional
filter on startup and is unlikely to provide any latency improvement.

I can easily add it back if you think it's worth it anyway :)

Paul


More information about the Strace-devel mailing list