[SRU Bionic/Focal/Hirsute/Impish 0/1] LP: #1948351

Thadeu Lima de Souza Cascardo cascardo at canonical.com
Fri Oct 22 21:12:31 UTC 2021


BugLink: https://bugs.launchpad.net/bugs/1948351

[Impact]
When doing MOD by 1 with a immediate/constant divisor on PPC, the JIT will
produce code that returns the dividend, just like a division, instead of 0.

Both eBPF and cBPF will fail as well when doing such operations.

[Test case]
Build the program on the bug description and run it like described.

[Potential regression]
BPF programs might misbehave on ppc64el.

Naveen N. Rao (1):
  powerpc/bpf: Fix BPF_MOD when imm == 1

 arch/powerpc/net/bpf_jit_comp64.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

-- 
2.32.0




More information about the kernel-team mailing list