aboutsummaryrefslogtreecommitdiffstats
path: root/lib/netdev-notifier-error-inject.c
diff options
context:
space:
mode:
authorYonghong Song <[email protected]>2025-01-18 19:20:29 +0000
committerAlexei Starovoitov <[email protected]>2025-01-20 17:46:10 +0000
commit0c35ca252a7dea61f0731e99d695492176862e2c (patch)
treea7e2aad21d76b996bdf0bb8fc99f1727b42d0457 /lib/netdev-notifier-error-inject.c
parentbpf: Allow 'may_goto 0' instruction in verifier (diff)
downloadkernel-0c35ca252a7dea61f0731e99d695492176862e2c.tar.gz
kernel-0c35ca252a7dea61f0731e99d695492176862e2c.zip
bpf: Remove 'may_goto 0' instruction in opt_remove_nops()
Since 'may_goto 0' insns are actually no-op, let us remove them. Otherwise, verifier will generate code like /* r10 - 8 stores the implicit loop count */ r11 = *(u64 *)(r10 -8) if r11 == 0x0 goto pc+2 r11 -= 1 *(u64 *)(r10 -8) = r11 which is the pure overhead. The following code patterns (from the previous commit) are also handled: may_goto 2 may_goto 1 may_goto 0 With this commit, the above three 'may_goto' insns are all eliminated. Signed-off-by: Yonghong Song <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
Diffstat (limited to 'lib/netdev-notifier-error-inject.c')
0 files changed, 0 insertions, 0 deletions