From 21e2297daeddcdd90a7c22d22bf4212fa505a8ef Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Thu, 8 Apr 2021 11:11:52 +0200 Subject: [PATCH] Revert "bpf: Use NOP_ATOMIC5 instead of emit_nops(&prog, 5) for BPF_TRAMP_F_CALL_ORIG" This reverts commit 7973a0dad073ce94bc13edd30224114e5c6aacb7. It breaks the abi but we can bring it back later on when the KABI update happens in a few days. Signed-off-by: Greg Kroah-Hartman Change-Id: I01fcc3fd586cb0e748524355403b3871c41df2b7 --- arch/x86/net/bpf_jit_comp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/x86/net/bpf_jit_comp.c b/arch/x86/net/bpf_jit_comp.c index 023ac12f54a2..652bd64e422d 100644 --- a/arch/x86/net/bpf_jit_comp.c +++ b/arch/x86/net/bpf_jit_comp.c @@ -1811,8 +1811,7 @@ int arch_prepare_bpf_trampoline(struct bpf_tramp_image *im, void *image, void *i /* remember return value in a stack for bpf prog to access */ emit_stx(&prog, BPF_DW, BPF_REG_FP, BPF_REG_0, -8); im->ip_after_call = prog; - memcpy(prog, ideal_nops[NOP_ATOMIC5], X86_PATCH_SIZE); - prog += X86_PATCH_SIZE; + emit_nops(&prog, 5); } if (fmod_ret->nr_progs) {