]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
bpf/verifier: improve disassembly of BPF_END instructions
authorEdward Cree <ecree@solarflare.com>
Tue, 26 Sep 2017 15:35:13 +0000 (16:35 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 28 Sep 2017 17:23:18 +0000 (10:23 -0700)
commit2b7c6ba945fd3c10ca3e030be402098aff2f89d3
treecd52665588f6241a51254562343647cb1faf66ec
parent4d8806fd14e1492cd4fb2021f709b163ea3364ad
bpf/verifier: improve disassembly of BPF_END instructions

print_bpf_insn() was treating all BPF_ALU[64] the same, but BPF_END has a
 different structure: it has a size in insn->imm (even if it's BPF_X) and
 uses the BPF_SRC (X or K) to indicate which endianness to use.  So it
 needs different code to print it.

Signed-off-by: Edward Cree <ecree@solarflare.com>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
kernel/bpf/verifier.c