[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231127183216.269958-2-larysa.zaremba@intel.com>
Date: Mon, 27 Nov 2023 19:32:15 +0100
From: Larysa Zaremba <larysa.zaremba@...el.com>
To: bpf@...r.kernel.org
Cc: Larysa Zaremba <larysa.zaremba@...el.com>,
netdev@...r.kernel.org,
Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Jesper Dangaard Brouer <hawk@...nel.org>,
Eric Dumazet <edumazet@...gle.com>,
Magnus Karlsson <magnus.karlsson@...il.com>,
Willem de Bruijn <willemdebruijn.kernel@...il.com>,
Yunsheng Lin <linyunsheng@...wei.com>,
Maciej Fijalkowski <maciej.fijalkowski@...el.com>,
John Fastabend <john.fastabend@...il.com>,
Aleksander Lobakin <aleksander.lobakin@...el.com>
Subject: [PATCH bpf-next v3 1/2] selftests/bpf: increase invalid metadata size
Changed check expects passed data meta to be deemed invalid.
After loosening the requirement, the size of 36 bytes becomes valid.
Therefore, increase tested meta size to 256, so we do not get an unexpected
success.
Signed-off-by: Larysa Zaremba <larysa.zaremba@...el.com>
---
tools/testing/selftests/bpf/prog_tests/xdp_context_test_run.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/bpf/prog_tests/xdp_context_test_run.c b/tools/testing/selftests/bpf/prog_tests/xdp_context_test_run.c
index ab4952b9fb1d..e6a783c7f5db 100644
--- a/tools/testing/selftests/bpf/prog_tests/xdp_context_test_run.c
+++ b/tools/testing/selftests/bpf/prog_tests/xdp_context_test_run.c
@@ -77,8 +77,8 @@ void test_xdp_context_test_run(void)
test_xdp_context_error(prog_fd, opts, 4, sizeof(__u32), sizeof(data),
0, 0, 0);
- /* Meta data must be 32 bytes or smaller */
- test_xdp_context_error(prog_fd, opts, 0, 36, sizeof(data), 0, 0, 0);
+ /* Meta data must be 255 bytes or smaller */
+ test_xdp_context_error(prog_fd, opts, 0, 256, sizeof(data), 0, 0, 0);
/* Total size of data must match data_end - data_meta */
test_xdp_context_error(prog_fd, opts, 0, sizeof(__u32),
--
2.41.0
Powered by blists - more mailing lists