-
Notifications
You must be signed in to change notification settings - Fork 171
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bpf: track accumulator state and reload it when necessary
It turns out there are a few corner cases where we incorrectly generate seccomp BPF due to poor accumulator state tracking for each BPF instruction block. This patch adds accumulator state tracking such that we know what any given instruction block expects from the accumulator and what value it leaves in the accumulator when it is finished. This allows us to veryify the accumulator state when assembling the instruction blocks into the final BPF program and if necessary we can insert accumulator load/mask instructions to maintain the proper accumulator state. Reported-by: Matthew Heon <mheon@redhat.com> Signed-off-by: Paul Moore <pmoore@redhat.com>
- Loading branch information
Showing
1 changed file
with
168 additions
and
31 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