mirror of
https://github.com/torvalds/linux.git
synced 2026-11-27 08:52:27 +00:00
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 <[email protected]>
Acked-by: Alexei Starovoitov <[email protected]>
Fixes: e54bcde3d6 ("arm64: eBPF JIT compiler")
Cc: <[email protected]> # 3.18+
Signed-off-by: Xi Wang <[email protected]>
Signed-off-by: Catalin Marinas <[email protected]>