public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH AUTOSEL 6.13 01/32] selftests/bpf: Adjust data size to have ETH_HLEN
@ 2025-02-24 11:16 Sasha Levin
  2025-02-24 11:16 ` [PATCH AUTOSEL 6.13 02/32] bpf: unify VM_WRITE vs VM_MAYWRITE use in BPF map mmaping logic Sasha Levin
                   ` (30 more replies)
  0 siblings, 31 replies; 34+ messages in thread
From: Sasha Levin @ 2025-02-24 11:16 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Shigeru Yoshida, Martin KaFai Lau, Alexei Starovoitov,
	Sasha Levin, daniel, davem, kuba, hawk, john.fastabend, andrii,
	eddyz87, shuah, netdev, bpf, linux-kselftest

From: Shigeru Yoshida <syoshida@redhat.com>

[ Upstream commit c7f2188d68c114095660a950b7e880a1e5a71c8f ]

The function bpf_test_init() now returns an error if user_size
(.data_size_in) is less than ETH_HLEN, causing the tests to
fail. Adjust the data size to ensure it meets the requirement of
ETH_HLEN.

Signed-off-by: Shigeru Yoshida <syoshida@redhat.com>
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
Link: https://patch.msgid.link/20250121150643.671650-2-syoshida@redhat.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 .../testing/selftests/bpf/prog_tests/xdp_cpumap_attach.c  | 4 ++--
 .../testing/selftests/bpf/prog_tests/xdp_devmap_attach.c  | 8 ++++----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/tools/testing/selftests/bpf/prog_tests/xdp_cpumap_attach.c b/tools/testing/selftests/bpf/prog_tests/xdp_cpumap_attach.c
index c7f74f068e788..df27535995af8 100644
--- a/tools/testing/selftests/bpf/prog_tests/xdp_cpumap_attach.c
+++ b/tools/testing/selftests/bpf/prog_tests/xdp_cpumap_attach.c
@@ -52,10 +52,10 @@ static void test_xdp_with_cpumap_helpers(void)
 	ASSERT_EQ(info.id, val.bpf_prog.id, "Match program id to cpumap entry prog_id");
 
 	/* send a packet to trigger any potential bugs in there */
-	char data[10] = {};
+	char data[ETH_HLEN] = {};
 	DECLARE_LIBBPF_OPTS(bpf_test_run_opts, opts,
 			    .data_in = &data,
-			    .data_size_in = 10,
+			    .data_size_in = sizeof(data),
 			    .flags = BPF_F_TEST_XDP_LIVE_FRAMES,
 			    .repeat = 1,
 		);
diff --git a/tools/testing/selftests/bpf/prog_tests/xdp_devmap_attach.c b/tools/testing/selftests/bpf/prog_tests/xdp_devmap_attach.c
index 27ffed17d4be3..461ab18705d5c 100644
--- a/tools/testing/selftests/bpf/prog_tests/xdp_devmap_attach.c
+++ b/tools/testing/selftests/bpf/prog_tests/xdp_devmap_attach.c
@@ -23,7 +23,7 @@ static void test_xdp_with_devmap_helpers(void)
 	__u32 len = sizeof(info);
 	int err, dm_fd, dm_fd_redir, map_fd;
 	struct nstoken *nstoken = NULL;
-	char data[10] = {};
+	char data[ETH_HLEN] = {};
 	__u32 idx = 0;
 
 	SYS(out_close, "ip netns add %s", TEST_NS);
@@ -58,7 +58,7 @@ static void test_xdp_with_devmap_helpers(void)
 	/* send a packet to trigger any potential bugs in there */
 	DECLARE_LIBBPF_OPTS(bpf_test_run_opts, opts,
 			    .data_in = &data,
-			    .data_size_in = 10,
+			    .data_size_in = sizeof(data),
 			    .flags = BPF_F_TEST_XDP_LIVE_FRAMES,
 			    .repeat = 1,
 		);
@@ -158,7 +158,7 @@ static void test_xdp_with_devmap_helpers_veth(void)
 	struct nstoken *nstoken = NULL;
 	__u32 len = sizeof(info);
 	int err, dm_fd, dm_fd_redir, map_fd, ifindex_dst;
-	char data[10] = {};
+	char data[ETH_HLEN] = {};
 	__u32 idx = 0;
 
 	SYS(out_close, "ip netns add %s", TEST_NS);
@@ -208,7 +208,7 @@ static void test_xdp_with_devmap_helpers_veth(void)
 	/* send a packet to trigger any potential bugs in there */
 	DECLARE_LIBBPF_OPTS(bpf_test_run_opts, opts,
 			    .data_in = &data,
-			    .data_size_in = 10,
+			    .data_size_in = sizeof(data),
 			    .flags = BPF_F_TEST_XDP_LIVE_FRAMES,
 			    .repeat = 1,
 		);
-- 
2.39.5


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

end of thread, other threads:[~2025-03-15  1:30 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-24 11:16 [PATCH AUTOSEL 6.13 01/32] selftests/bpf: Adjust data size to have ETH_HLEN Sasha Levin
2025-02-24 11:16 ` [PATCH AUTOSEL 6.13 02/32] bpf: unify VM_WRITE vs VM_MAYWRITE use in BPF map mmaping logic Sasha Levin
2025-02-24 11:16 ` [PATCH AUTOSEL 6.13 03/32] selftests/bpf: Fix invalid flag of recv() Sasha Levin
2025-02-24 11:16 ` [PATCH AUTOSEL 6.13 04/32] ASoC: Intel: sof_sdw: Add lookup of quirk using PCI subsystem ID Sasha Levin
2025-02-24 11:16 ` [PATCH AUTOSEL 6.13 05/32] ASoC: Intel: sof_sdw: Add quirk for Asus Zenbook S14 Sasha Levin
2025-02-24 11:16 ` [PATCH AUTOSEL 6.13 06/32] ASoC: Intel: sof_sdw: Add support for Fatcat board with BT offload enabled in PTL platform Sasha Levin
2025-02-24 11:16 ` [PATCH AUTOSEL 6.13 07/32] ASoC: Intel: soc-acpi-intel-mtl-match: declare adr as ull Sasha Levin
2025-02-24 11:16 ` [PATCH AUTOSEL 6.13 08/32] ASoC: simple-card-utils.c: add missing dlc->of_node Sasha Levin
2025-02-24 11:16 ` [PATCH AUTOSEL 6.13 09/32] ALSA: hda/realtek: Limit mic boost on Positivo ARN50 Sasha Levin
2025-02-24 11:16 ` [PATCH AUTOSEL 6.13 10/32] ASoC: rsnd: indicate unsupported clock rate Sasha Levin
2025-02-24 11:16 ` [PATCH AUTOSEL 6.13 11/32] ASoC: rsnd: don't indicate warning on rsnd_kctrl_accept_runtime() Sasha Levin
2025-02-24 11:16 ` [PATCH AUTOSEL 6.13 12/32] ASoC: rsnd: adjust convert rate limitation Sasha Levin
2025-02-24 11:16 ` [PATCH AUTOSEL 6.13 13/32] ASoC: arizona/madera: use fsleep() in up/down DAPM event delays Sasha Levin
2025-02-24 11:16 ` [PATCH AUTOSEL 6.13 14/32] ASoC: SOF: Intel: hda: add softdep pre to snd-hda-codec-hdmi module Sasha Levin
2025-02-24 11:16 ` [PATCH AUTOSEL 6.13 15/32] PCI: pci_ids: add INTEL_HDA_PTL_H Sasha Levin
2025-02-24 11:16 ` [PATCH AUTOSEL 6.13 16/32] ALSA: hda: intel-dsp-config: Add PTL-H support Sasha Levin
2025-02-24 11:16 ` [PATCH AUTOSEL 6.13 17/32] ASoC: SOF: Intel: pci-ptl: Add support for PTL-H Sasha Levin
2025-02-24 11:16 ` [PATCH AUTOSEL 6.13 18/32] ALSA: hda: hda-intel: add Panther Lake-H support Sasha Levin
2025-02-24 11:16 ` [PATCH AUTOSEL 6.13 19/32] ASoC: SOF: amd: Add post_fw_run_delay ACP quirk Sasha Levin
2025-02-24 11:16 ` [PATCH AUTOSEL 6.13 20/32] ASoC: SOF: amd: Handle IPC replies before FW_BOOT_COMPLETE Sasha Levin
2025-02-24 11:16 ` [PATCH AUTOSEL 6.13 21/32] net: wwan: mhi_wwan_mbim: Silence sequence number glitch errors Sasha Levin
2025-02-24 11:16 ` [PATCH AUTOSEL 6.13 22/32] io-wq: backoff when retrying worker creation Sasha Levin
2025-02-24 11:16 ` [PATCH AUTOSEL 6.13 23/32] nvme-pci: quirk Acer FA100 for non-uniqueue identifiers Sasha Levin
2025-02-24 11:16 ` [PATCH AUTOSEL 6.13 24/32] nvme-tcp: add basic support for the C2HTermReq PDU Sasha Levin
2025-02-24 11:16 ` [PATCH AUTOSEL 6.13 25/32] nvmet-rdma: recheck queue state is LIVE in state lock in recv done Sasha Levin
2025-02-24 11:16 ` [PATCH AUTOSEL 6.13 26/32] apple-nvme: Release power domains when probe fails Sasha Levin
2025-02-24 11:16 ` [PATCH AUTOSEL 6.13 27/32] drm/xe: Make GUC binaries dump consistent with other binaries in devcoredump Sasha Levin
2025-02-24 11:16 ` [PATCH AUTOSEL 6.13 28/32] cifs: Throw -EOPNOTSUPP error on unsupported reparse point type from parse_reparse_point() Sasha Levin
2025-02-24 11:16 ` [PATCH AUTOSEL 6.13 29/32] cifs: Treat unhandled directory name surrogate reparse points as mount directory nodes Sasha Levin
2025-02-24 11:16 ` [PATCH AUTOSEL 6.13 30/32] sctp: Fix undefined behavior in left shift operation Sasha Levin
2025-02-24 11:16 ` [PATCH AUTOSEL 6.13 31/32] nvme: only allow entering LIVE from CONNECTING state Sasha Levin
2025-02-24 11:16 ` [PATCH AUTOSEL 6.13 32/32] irqchip/qcom-pdc: Workaround hardware register bug on X1E80100 Sasha Levin
2025-02-24 14:46   ` Johan Hovold
2025-03-15  1:30     ` Sasha Levin

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