diff options
author | 2023-07-27 18:12:07 -0700 | |
---|---|---|
committer | 2023-07-27 18:52:33 -0700 | |
commit | 1f1e864b65554e33fe74e3377e58b12f4302f2eb (patch) | |
tree | 9effb1a9e6dfd2f9bd97b90965f50d984612f7f5 /kernel/bpf/core.c | |
parent | bpf: Support new sign-extension mov insns (diff) | |
download | wireguard-linux-1f1e864b65554e33fe74e3377e58b12f4302f2eb.tar.xz wireguard-linux-1f1e864b65554e33fe74e3377e58b12f4302f2eb.zip |
bpf: Handle sign-extenstin ctx member accesses
Currently, if user accesses a ctx member with signed types,
the compiler will generate an unsigned load followed by
necessary left and right shifts.
With the introduction of sign-extension load, compiler may
just emit a ldsx insn instead. Let us do a final movsx sign
extension to the final unsigned ctx load result to
satisfy original sign extension requirement.
Acked-by: Eduard Zingerman <eddyz87@gmail.com>
Signed-off-by: Yonghong Song <yonghong.song@linux.dev>
Link: https://lore.kernel.org/r/20230728011207.3712528-1-yonghong.song@linux.dev
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'kernel/bpf/core.c')
0 files changed, 0 insertions, 0 deletions