Skip to content
Commit db7bee65 authored by Ilya Leoshkevich's avatar Ilya Leoshkevich Committed by Vasily Gorbik
Browse files

s390/bpf: Fix optimizing out zero-extensions



Currently the JIT completely removes things like `reg32 += 0`,
however, the BPF_ALU semantics requires the target register to be
zero-extended in such cases.

Fix by optimizing out only the arithmetic operation, but not the
subsequent zero-extension.

Reported-by: default avatarJohan Almbladh <johan.almbladh@anyfinetworks.com>
Fixes: 05462310

 ("s390/bpf: Add s390x eBPF JIT compiler backend")
Reviewed-by: default avatarHeiko Carstens <hca@linux.ibm.com>
Signed-off-by: default avatarIlya Leoshkevich <iii@linux.ibm.com>
Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
parent 6e61dc9d
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment