summaryrefslogtreecommitdiff
path: root/kernel/bpf/core.c
diff options
context:
space:
mode:
authorJakub Kicinski <jakub.kicinski@netronome.com>2019-01-22 22:45:19 -0800
committerAlexei Starovoitov <ast@kernel.org>2019-01-23 17:35:31 -0800
commite2ae4ca266a1c9a0163738129506dbc63d5cca80 (patch)
tree12c1c1309321df450462fdb2242f0c9187e8120d /kernel/bpf/core.c
parent2cbd95a5c4fb855a4177c0343a880cc2091f500d (diff)
bpf: verifier: hard wire branches to dead code
Loading programs with dead code becomes more and more common, as people begin to patch constants at load time. Turn conditional jumps to unconditional ones, to avoid potential branch misprediction penalty. This optimization is enabled for privileged users only. For branches which just fall through we could just mark them as not seen and have dead code removal take care of them, but that seems less clean. v0.2: - don't call capable(CAP_SYS_ADMIN) twice (Jiong). v3: - fix GCC warning; Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Acked-by: Yonghong Song <yhs@fb.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'kernel/bpf/core.c')
0 files changed, 0 insertions, 0 deletions