On 9/4/24 9:56 AM, Alexei Starovoitov wrote:
On Tue, Sep 3, 2024 at 4:00 PM Yonghong Song <yonghong.song@xxxxxxxxx> wrote:
diff --git a/arch/x86/net/bpf_jit_comp.c b/arch/x86/net/bpf_jit_comp.c
index 074b41fafbe3..63c4816ed4e7 100644
--- a/arch/x86/net/bpf_jit_comp.c
+++ b/arch/x86/net/bpf_jit_comp.c
@@ -64,6 +64,57 @@ static bool is_imm8(int value)
return value <= 127 && value >= -128;
}
+/*
+ * Let us limit the positive offset to be <= 124.
I think the comment will read better if the above says "<= 123",
since that's the final outcome.
124 above is a bit confusing.
I can tweak while applying if you agree.
Correct. Let us do "<= 123".
+ * to mamximum 123 (0x7b). This way, the jit pass can eventually converge.
Can fix this typo too.
Sounds good.
Since I need to change test in the second patch (enabling tests for arm64/s390),
let me send v3 to address all comments.