linux/arch/arm64/net
Xi Wang 1aca08fe1f arm64: bpf: fix endianness conversion bugs
commit d63903bbc3 upstream.

Upper bits should be zeroed in endianness conversion:

- even when there's no need to change endianness (i.e., BPF_FROM_BE
  on big endian or BPF_FROM_LE on little endian);

- after rev16.

This patch fixes such bugs by emitting extra instructions to clear
upper bits.

Cc: Zi Shen Lim <zlim.lnx@gmail.com>
Acked-by: Alexei Starovoitov <ast@plumgrid.com>
Fixes: e54bcde3d6 ("arm64: eBPF JIT compiler")
Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2015-08-03 09:29:18 -07:00
..
bpf_jit.h arm64: bpf: fix endianness conversion bugs 2015-08-03 09:29:18 -07:00
bpf_jit_comp.c arm64: bpf: fix endianness conversion bugs 2015-08-03 09:29:18 -07:00
Makefile arm64: eBPF JIT compiler 2014-09-08 14:39:21 +01:00