From 9f331c5700ef361ba5ba4806732a527ba40ee9b7 Mon Sep 17 00:00:00 2001 From: Gary Lin Date: Wed, 24 Aug 2022 11:20:39 +0800 Subject: [PATCH] test_bpf: Remove EXPECTED_FAIL flag from bpf_fill_maxinsns11 mainline inclusion from mainline-5.12-rc1 commit 16a660ef7d8c89787ee4bf352458681439485649 category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I5EUVD CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=16a660ef7d8c89787ee4bf352458681439485649 ------------------------------------------------- With NOPs padding, x64 jit now can handle the jump cases like bpf_fill_maxinsns11(). Signed-off-by: Gary Lin Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20210119102501.511-3-glin@suse.com (cherry picked from commit 16a660ef7d8c89787ee4bf352458681439485649) Signed-off-by: Wang Yufen --- lib/test_bpf.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/lib/test_bpf.c b/lib/test_bpf.c index aba3c7e43ee5..acf825d81671 100644 --- a/lib/test_bpf.c +++ b/lib/test_bpf.c @@ -345,7 +345,7 @@ static int __bpf_fill_ja(struct bpf_test *self, unsigned int len, static int bpf_fill_maxinsns11(struct bpf_test *self) { - /* Hits 70 passes on x86_64, so cannot get JITed there. */ + /* Hits 70 passes on x86_64 and triggers NOPs padding. */ return __bpf_fill_ja(self, BPF_MAXINSNS, 68); } @@ -5318,15 +5318,10 @@ static struct bpf_test tests[] = { { "BPF_MAXINSNS: Jump, gap, jump, ...", { }, -#if defined(CONFIG_BPF_JIT_ALWAYS_ON) && defined(CONFIG_X86) - CLASSIC | FLAG_NO_DATA | FLAG_EXPECTED_FAIL, -#else CLASSIC | FLAG_NO_DATA, -#endif { }, { { 0, 0xababcbac } }, .fill_helper = bpf_fill_maxinsns11, - .expected_errcode = -ENOTSUPP, }, { "BPF_MAXINSNS: jump over MSH", -- GitLab