Commit e1d04484 authored by Jiong Wang's avatar Jiong Wang Committed by Xie XiuQi
Browse files

nfp: bpf: fix ALU32 high bits clearance bug



mainline inclusion
from mainline-5.0
commit f036ebd9
category: bugfix
bugzilla: 10913
CVE: NA

-------------------------------------------------

NFP BPF JIT compiler is doing a couple of small optimizations when jitting
ALU imm instructions, some of these optimizations could save code-gen, for
example:

  A & -1 =  A
  A |  0 =  A
  A ^  0 =  A

However, for ALU32, high 32-bit of the 64-bit register should still be
cleared according to ISA semantics.

Fixes: cd7df56e ("nfp: add BPF to NFP code translator")
Reviewed-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: default avatarJiong Wang <jiong.wang@netronome.com>
Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
Signed-off-by: default avatarZhiqiang Liu <liuzhiqiang26@huawei.com>
Reviewed-by: default avatarMao Wenan <maowenan@huawei.com>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
parent 51f60c79
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment