bpf, x86: save/restore regs with BPF_DW size
authorMenglong Dong <imagedong@tencent.com>
Thu, 13 Jul 2023 04:07:36 +0000 (12:07 +0800)
committerAlexei Starovoitov <ast@kernel.org>
Thu, 13 Jul 2023 23:04:56 +0000 (16:04 -0700)
commit02a6dfa8ff43efb1c989f87a4d862aedf436088a
tree1f48fb9794d958125471c4f451f56f7688da4e69
parent0a5550b1165cd60ad6972791eda4a3eb7e347280
bpf, x86: save/restore regs with BPF_DW size

As we already reserve 8 byte in the stack for each reg, it is ok to
store/restore the regs in BPF_DW size. This will make the code in
save_regs()/restore_regs() simpler.

Signed-off-by: Menglong Dong <imagedong@tencent.com>
Acked-by: Yonghong Song <yhs@fb.com>
Link: https://lore.kernel.org/r/20230713040738.1789742-2-imagedong@tencent.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
arch/x86/net/bpf_jit_comp.c