[PATCH bpf-next 0/4] Reduce overhead of LSMs with static calls

Song Liu song at kernel.org
Fri Jan 27 19:22:03 UTC 2023


Hi KP,

Thanks for working on this!

On Thu, Jan 19, 2023 at 3:10 PM KP Singh <kpsingh at kernel.org> wrote:
>
[...]
>
> # Performance improvement
>
> With this patch-set some syscalls with lots of LSM hooks in their path
> benefitted at an average of ~3%. Here are the results of the relevant Unixbench
> system benchmarks with BPF LSM and a major LSM (in this case apparmor) enabled
> with and without the series.
>
> Benchmark                                               Delta(%): (+ is better)
> ===============================================================================
> Execl Throughput                                             +2.9015
> File Write 1024 bufsize 2000 maxblocks                       +5.4196
> Pipe Throughput                                              +7.7434
> Pipe-based Context Switching                                 +3.5118
> Process Creation                                             +0.3552
> Shell Scripts (1 concurrent)                                 +1.7106
> System Call Overhead                                         +3.0067
> System Benchmarks Index Score (Partial Only):                +3.1809
>
> In the best case, some syscalls like eventfd_create benefitted to about ~10%.

The results look very promising. These optimizations will make it easier
for our users (at Meta) to adopt LSM solutions.

Thanks again!
Song



More information about the Linux-security-module-archive mailing list