mirror of
https://github.com/torvalds/linux.git
synced 2024-11-15 08:31:55 +00:00
7477d43be5
Both signed and unsigned variants of BPF_JMP | BPF_K require
sign-extending the immediate. JIT emits cgfi for the signed case,
which is correct, and clgfi for the unsigned case, which is not
correct: clgfi zero-extends the immediate.
s390 does not provide an instruction that does sign-extension and
unsigned comparison at the same time. Therefore, fix by first loading
the sign-extended immediate into work register REG_1 and proceeding
as if it's BPF_X.
Fixes:
|
||
---|---|---|
.. | ||
bpf_jit_comp.c | ||
bpf_jit.h | ||
Makefile | ||
pnet.c |