-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
seccomp
: Optimize half value matchers when possible.
For `MaskedEqual`'s matchers, this looks at the mask being matched against, and simplifies the matcher if that mask is either 0 (in which case any value is allowed), or full bits (in which case there is no need to run an `AND` operation on the bits). Similar thing for `halfNotSet`. Benchmarks: ``` │ before │ after │ │ build-sec │ build-sec vs base │ SentrySystrap 34.10m ± 0% 74.15m ± 0% +117.49% (p=0.000 n=144+145) SentryKVM 142.2m ± 0% 419.5m ± 0% +195.08% (p=0.000 n=144+145) NVProxyIoctl 380.0m ± 0% 1139.7m ± 0% +199.96% (p=0.000 n=144+145) │ before │ after │ │ compression-ratio │ compression-ratio vs base │ SentrySystrap 3.252 ± 0% 3.443 ± 0% +5.87% (p=0.000 n=144+145) SentryKVM 3.318 ± 0% 3.501 ± 0% +5.52% (p=0.000 n=144+145) NVProxyIoctl 3.298 ± 0% 3.504 ± 0% +6.25% (p=0.000 n=144+145) │ before │ after │ │ gen-instr │ gen-instr vs base │ SentrySystrap 1.538k ± 0% 1.618k ± 0% +5.20% (p=0.000 n=144+145) SentryKVM 1.649k ± 0% 1.733k ± 0% +5.09% (p=0.000 n=144+145) NVProxyIoctl 2.233k ± 0% 2.355k ± 0% +5.46% (p=0.000 n=144+145) │ before │ after │ │ opt-instr │ opt-instr vs base │ SentrySystrap 473.0 ± 0% 470.0 ± 0% -0.63% (n=144+145) SentryKVM 497.0 ± 0% 495.0 ± 0% -0.40% (n=144+145) NVProxyIoctl 677.0 ± 0% 672.0 ± 0% -0.74% (n=144+145) │ before │ after │ │ opt-sec │ opt-sec vs base │ SentrySystrap 109.8m ± 0% 109.7m ± 1% ~ (p=0.179 n=144+145) SentryKVM 104.8m ± 0% 103.2m ± 1% -1.44% (p=0.000 n=144+145) NVProxyIoctl 265.7m ± 0% 264.9m ± 1% ~ (p=0.115 n=144+145) ``` PiperOrigin-RevId: 586484636
- Loading branch information
1 parent
368fc60
commit be011b9
Showing
2 changed files
with
297 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.