]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 10 Jan 2024 16:10:27 +0000 (17:10 +0100)
commit89b51e70e5e335ba5c00abad1bfd9d52acd8afce
treea0ab9f37bc94978a6016f3fd0bbe00844f75c8cd
parent4ee461c5dc99471fec206e9749b16c0bbb3dac8b
bpf, x86: save/restore regs with BPF_DW size

[ Upstream commit 02a6dfa8ff43efb1c989f87a4d862aedf436088a ]

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>
Stable-dep-of: 2b5dcb31a19a ("bpf, x64: Fix tailcall infinite loop")
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/x86/net/bpf_jit_comp.c