summaryrefslogtreecommitdiffstats
path: root/kernel/bpf/disasm.c
diff options
context:
space:
mode:
authorAndrii Nakryiko <andrii@kernel.org>2022-12-22 21:49:19 -0800
committerAlexei Starovoitov <ast@kernel.org>2022-12-27 17:37:07 -0800
commit4a95c85c994801c9ae12d9cb7216da7b484564b3 (patch)
tree10dde7a47d86533a0523c911b44385f6ac50f563 /kernel/bpf/disasm.c
parent910f69996674bfc4a273a335c1fb2ecb45062bf6 (diff)
downloadlinux-4a95c85c994801c9ae12d9cb7216da7b484564b3.tar.gz
linux-4a95c85c994801c9ae12d9cb7216da7b484564b3.tar.bz2
linux-4a95c85c994801c9ae12d9cb7216da7b484564b3.zip
bpf: perform byte-by-byte comparison only when necessary in regsafe()
Extract byte-by-byte comparison of bpf_reg_state in regsafe() into a helper function, which makes it more convenient to use it "on demand" only for registers that benefit from such checks, instead of doing it all the time, even if result of such comparison is ignored. Also, remove WARN_ON_ONCE(1)+return false dead code. There is no risk of missing some case as compiler will warn about non-void function not returning value in some branches (and that under assumption that default case is removed in the future). Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/r/20221223054921.958283-6-andrii@kernel.org Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'kernel/bpf/disasm.c')
0 files changed, 0 insertions, 0 deletions