mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] BPF : arch/x86/net/bpf_jit_comp.c : fix wrong condition code in jit compiler
@ 2024-09-25  8:23 zyf
  2024-09-25 12:37 ` Daniel Borkmann
  0 siblings, 1 reply; 2+ messages in thread
From: zyf @ 2024-09-25  8:23 UTC (permalink / raw)
  To: bpf; +Cc: linux-kernel, netdev, dsahern, zyf

change 'case BPF_ALU64 | BPF_END | BPF_FROM_LE' to 'case BPF_ALU64 | BPF_END | BPF_FROM_BE'

Signed-off-by: zyf <zhouyangfan20s@ict.ac.cn>
---
 arch/x86/net/bpf_jit_comp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/net/bpf_jit_comp.c b/arch/x86/net/bpf_jit_comp.c
index 06b080b61aa5..7f954d76b3a6 100644
--- a/arch/x86/net/bpf_jit_comp.c
+++ b/arch/x86/net/bpf_jit_comp.c
@@ -1786,7 +1786,7 @@ static int do_jit(struct bpf_prog *bpf_prog, int *addrs, u8 *image, u8 *rw_image
 			break;
 
 		case BPF_ALU | BPF_END | BPF_FROM_BE:
-		case BPF_ALU64 | BPF_END | BPF_FROM_LE:
+		case BPF_ALU64 | BPF_END | BPF_FROM_BE:
 			switch (imm32) {
 			case 16:
 				/* Emit 'ror %ax, 8' to swap lower 2 bytes */
-- 
2.39.2


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-09-25 12:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-09-25  8:23 [PATCH] BPF : arch/x86/net/bpf_jit_comp.c : fix wrong condition code in jit compiler zyf
2024-09-25 12:37 ` Daniel Borkmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®