Re: [PATCH 0/6 v5 RESEND] seccomp: add the synchronous mode for seccomp_unotify

From: Andrei Vagin
Date: Tue Mar 21 2023 - 14:19:23 EST


On Tue, Mar 7, 2023 at 11:32 PM Andrei Vagin <avagin@xxxxxxxxxx> wrote:
>
> seccomp_unotify allows more privileged processes do actions on behalf
> of less privileged processes.
>
> In many cases, the workflow is fully synchronous. It means a target
> process triggers a system call and passes controls to a supervisor
> process that handles the system call and returns controls back to the
> target process. In this context, "synchronous" means that only one
> process is running and another one is waiting.
>
> The new WF_CURRENT_CPU flag advises the scheduler to move the wakee to
> the current CPU. For such synchronous workflows, it makes context
> switches a few times faster.
>
> Right now, each interaction takes 12µs. With this patch, it takes about
> 3µs.
>
> v2: clean up the first patch and add the test.
> v3: update commit messages and a few fixes suggested by Kees Cook.
> v4: update the third patch to avoid code duplications (suggested by
> Peter Zijlstra)
> Add the benchmark to the perf bench set.
> v5: Update the author email. No code changes.
>
> Kees is ready to take this patch set, but wants to get Acks from the
> sched folks.

Peter, could you review the second and third patches of this series?

Thanks,
Andrei