From: Larysa Zaremba <larysa.zaremba@intel.com>
To: bpf@vger.kernel.org
Cc: Larysa Zaremba <larysa.zaremba@intel.com>,
netdev@vger.kernel.org, Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
Jesper Dangaard Brouer <hawk@kernel.org>,
Eric Dumazet <edumazet@google.com>,
Magnus Karlsson <magnus.karlsson@gmail.com>,
Willem de Bruijn <willemdebruijn.kernel@gmail.com>,
Yunsheng Lin <linyunsheng@huawei.com>,
Maciej Fijalkowski <maciej.fijalkowski@intel.com>,
John Fastabend <john.fastabend@gmail.com>,
Aleksander Lobakin <aleksander.lobakin@intel.com>
Subject: [PATCH bpf-next v3 1/2] selftests/bpf: increase invalid metadata size
Date: Mon, 27 Nov 2023 19:32:15 +0100 [thread overview]
Message-ID: <20231127183216.269958-2-larysa.zaremba@intel.com> (raw)
In-Reply-To: <20231127183216.269958-1-larysa.zaremba@intel.com>
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@intel.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
next prev parent reply other threads:[~2023-11-27 18:51 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-27 18:32 [PATCH bpf-next v3 0/2] Allow data_meta size > 32 Larysa Zaremba
2023-11-27 18:32 ` Larysa Zaremba [this message]
2023-11-27 18:32 ` [PATCH bpf-next v3 2/2] net, xdp: allow metadata " Larysa Zaremba
2023-11-28 10:26 ` [PATCH bpf-next v3 0/2] Allow data_meta size " Jesper Dangaard Brouer
2023-11-28 10:33 ` Larysa Zaremba
2023-11-28 11:30 ` Jesper Dangaard Brouer
2023-11-28 12:25 ` Alexander Lobakin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231127183216.269958-2-larysa.zaremba@intel.com \
--to=larysa.zaremba@intel.com \
--cc=aleksander.lobakin@intel.com \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hawk@kernel.org \
--cc=john.fastabend@gmail.com \
--cc=kuba@kernel.org \
--cc=linyunsheng@huawei.com \
--cc=maciej.fijalkowski@intel.com \
--cc=magnus.karlsson@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=willemdebruijn.kernel@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox