diff for duplicates of <20260225012403.986715285@linuxfoundation.org> diff --git a/a/1.txt b/N1/1.txt index d9e24c7..1bb1329 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -1,95 +1,93 @@ -6.19-stable review patch. If anyone has any objections, please let me know. +6.18-stable review patch. If anyone has any objections, please let me know. ------------------ -From: Jerome Brunet <jbrunet@baylibre.com> +From: Martin KaFai Lau <martin.lau@kernel.org> -[ Upstream commit 406706559046eebc09a31e8ae5e78620bfd746fe ] +commit 6cc73f35406cae1f053e984e8de40e6dc9681446 upstream. -The amlogic MMC driver operate with the assumption that MMC clock -is configured to provide 24MHz. It uses this path for low -rates such as 400kHz. +Add a test to check that bpf_skb_check_mtu(BPF_MTU_CHK_SEGS) is +rejected (-EINVAL) if skb->transport_header is not set. The test +needs to lower the MTU of the loopback device. Thus, take this +opportunity to run the test in a netns by adding "ns_" to the test +name. The "serial_" prefix can then be removed. -Assign the clocks to make sure they are properly configured - -Fixes: 50662499f911 ("ARM64: dts: meson-gx: Use correct mmc clock source 0") -Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> -Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> -Link: https://patch.msgid.link/20260114-amlogic-mmc-clocks-followup-v1-4-a999fafbe0aa@baylibre.com -Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> -Signed-off-by: Sasha Levin <sashal@kernel.org> +Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org> +Link: https://lore.kernel.org/r/20251112232331.1566074-2-martin.lau@linux.dev +Signed-off-by: Alexei Starovoitov <ast@kernel.org> +Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> +--- +Signed-off-by: Shung-Hsi Yu <shung-hsi.yu@suse.com> --- - arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 9 +++++++++ - arch/arm64/boot/dts/amlogic/meson-gxl.dtsi | 9 +++++++++ - 2 files changed, 18 insertions(+) + tools/testing/selftests/bpf/prog_tests/check_mtu.c | 23 ++++++++++++++++++++- + tools/testing/selftests/bpf/progs/test_check_mtu.c | 12 ++++++++++ + 2 files changed, 34 insertions(+), 1 deletion(-) -diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi -index f69923da07feb..a9c830a570cc6 100644 ---- a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi -+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi -@@ -824,6 +824,9 @@ &sd_emmc_a { - <&clkc CLKID_FCLK_DIV2>; - clock-names = "core", "clkin0", "clkin1"; - resets = <&reset RESET_SD_EMMC_A>; -+ -+ assigned-clocks = <&clkc CLKID_SD_EMMC_A_CLK0>; -+ assigned-clock-rates = <24000000>; - }; +--- a/tools/testing/selftests/bpf/prog_tests/check_mtu.c ++++ b/tools/testing/selftests/bpf/prog_tests/check_mtu.c +@@ -153,6 +153,26 @@ static void test_check_mtu_run_tc(struct + ASSERT_EQ(mtu_result, mtu_expect, "MTU-compare-user"); + } - &sd_emmc_b { -@@ -832,6 +835,9 @@ &sd_emmc_b { - <&clkc CLKID_FCLK_DIV2>; - clock-names = "core", "clkin0", "clkin1"; - resets = <&reset RESET_SD_EMMC_B>; ++static void test_chk_segs_flag(struct test_check_mtu *skel, __u32 mtu) ++{ ++ int err, prog_fd = bpf_program__fd(skel->progs.tc_chk_segs_flag); ++ struct __sk_buff skb = { ++ .gso_size = 10, ++ }; ++ LIBBPF_OPTS(bpf_test_run_opts, topts, ++ .data_in = &pkt_v4, ++ .data_size_in = sizeof(pkt_v4), ++ .ctx_in = &skb, ++ .ctx_size_in = sizeof(skb), ++ ); + -+ assigned-clocks = <&clkc CLKID_SD_EMMC_B_CLK0>; -+ assigned-clock-rates = <24000000>; - }; ++ /* Lower the mtu to test the BPF_MTU_CHK_SEGS */ ++ SYS_NOFAIL("ip link set dev lo mtu 10"); ++ err = bpf_prog_test_run_opts(prog_fd, &topts); ++ SYS_NOFAIL("ip link set dev lo mtu %u", mtu); ++ ASSERT_OK(err, "test_run"); ++ ASSERT_EQ(topts.retval, BPF_OK, "retval"); ++} - &sd_emmc_c { -@@ -840,6 +846,9 @@ &sd_emmc_c { - <&clkc CLKID_FCLK_DIV2>; - clock-names = "core", "clkin0", "clkin1"; - resets = <&reset RESET_SD_EMMC_C>; -+ -+ assigned-clocks = <&clkc CLKID_SD_EMMC_C_CLK0>; -+ assigned-clock-rates = <24000000>; - }; + static void test_check_mtu_tc(__u32 mtu, __u32 ifindex) + { +@@ -177,11 +197,12 @@ static void test_check_mtu_tc(__u32 mtu, + test_check_mtu_run_tc(skel, skel->progs.tc_minus_delta, mtu); + test_check_mtu_run_tc(skel, skel->progs.tc_input_len, mtu); + test_check_mtu_run_tc(skel, skel->progs.tc_input_len_exceed, mtu); ++ test_chk_segs_flag(skel, mtu); + cleanup: + test_check_mtu__destroy(skel); + } - &simplefb_hdmi { -diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi -index ba535010a3c91..e202d84f06720 100644 ---- a/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi -+++ b/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi -@@ -894,6 +894,9 @@ &sd_emmc_a { - <&clkc CLKID_FCLK_DIV2>; - clock-names = "core", "clkin0", "clkin1"; - resets = <&reset RESET_SD_EMMC_A>; -+ -+ assigned-clocks = <&clkc CLKID_SD_EMMC_A_CLK0>; -+ assigned-clock-rates = <24000000>; - }; +-void serial_test_check_mtu(void) ++void test_ns_check_mtu(void) + { + int mtu_lo; - &sd_emmc_b { -@@ -902,6 +905,9 @@ &sd_emmc_b { - <&clkc CLKID_FCLK_DIV2>; - clock-names = "core", "clkin0", "clkin1"; - resets = <&reset RESET_SD_EMMC_B>; -+ -+ assigned-clocks = <&clkc CLKID_SD_EMMC_B_CLK0>; -+ assigned-clock-rates = <24000000>; - }; +--- a/tools/testing/selftests/bpf/progs/test_check_mtu.c ++++ b/tools/testing/selftests/bpf/progs/test_check_mtu.c +@@ -7,6 +7,7 @@ - &sd_emmc_c { -@@ -910,6 +916,9 @@ &sd_emmc_c { - <&clkc CLKID_FCLK_DIV2>; - clock-names = "core", "clkin0", "clkin1"; - resets = <&reset RESET_SD_EMMC_C>; -+ -+ assigned-clocks = <&clkc CLKID_SD_EMMC_C_CLK0>; -+ assigned-clock-rates = <24000000>; - }; + #include <stddef.h> + #include <stdint.h> ++#include <errno.h> + + char _license[] SEC("license") = "GPL"; - &simplefb_hdmi { --- -2.51.0 +@@ -288,3 +289,14 @@ int tc_input_len_exceed(struct __sk_buff + global_bpf_mtu_xdp = mtu_len; + return retval; + } ++ ++SEC("tc") ++int tc_chk_segs_flag(struct __sk_buff *ctx) ++{ ++ __u32 mtu_len = 0; ++ int err; ++ ++ err = bpf_check_mtu(ctx, GLOBAL_USER_IFINDEX, &mtu_len, 0, BPF_MTU_CHK_SEGS); ++ ++ return err == -EINVAL ? BPF_OK : BPF_DROP; ++} diff --git a/a/content_digest b/N1/content_digest index 72c9a99..31411b1 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -1,109 +1,107 @@ - "ref\020260225012359.695468795@linuxfoundation.org\0" + "ref\020260225012348.915798704@linuxfoundation.org\0" "From\0Greg Kroah-Hartman <gregkh@linuxfoundation.org>\0" - "Subject\0[PATCH 6.19 177/781] arm64: dts: amlogic: gx: assign the MMC signal clocks\0" - "Date\0Tue, 24 Feb 2026 17:14:46 -0800\0" + "Subject\0[PATCH 6.18 639/641] selftests/bpf: Test bpf_skb_check_mtu(BPF_MTU_CHK_SEGS) when transport_header is not set\0" + "Date\0Tue, 24 Feb 2026 17:26:05 -0800\0" "To\0stable@vger.kernel.org\0" "Cc\0Greg Kroah-Hartman <gregkh@linuxfoundation.org>" patches@lists.linux.dev - Jerome Brunet <jbrunet@baylibre.com> - Neil Armstrong <neil.armstrong@linaro.org> - " Sasha Levin <sashal@kernel.org>\0" + Martin KaFai Lau <martin.lau@kernel.org> + Alexei Starovoitov <ast@kernel.org> + " Shung-Hsi Yu <shung-hsi.yu@suse.com>\0" "\00:1\0" "b\0" - "6.19-stable review patch. If anyone has any objections, please let me know.\n" + "6.18-stable review patch. If anyone has any objections, please let me know.\n" "\n" "------------------\n" "\n" - "From: Jerome Brunet <jbrunet@baylibre.com>\n" + "From: Martin KaFai Lau <martin.lau@kernel.org>\n" "\n" - "[ Upstream commit 406706559046eebc09a31e8ae5e78620bfd746fe ]\n" + "commit 6cc73f35406cae1f053e984e8de40e6dc9681446 upstream.\n" "\n" - "The amlogic MMC driver operate with the assumption that MMC clock\n" - "is configured to provide 24MHz. It uses this path for low\n" - "rates such as 400kHz.\n" + "Add a test to check that bpf_skb_check_mtu(BPF_MTU_CHK_SEGS) is\n" + "rejected (-EINVAL) if skb->transport_header is not set. The test\n" + "needs to lower the MTU of the loopback device. Thus, take this\n" + "opportunity to run the test in a netns by adding \"ns_\" to the test\n" + "name. The \"serial_\" prefix can then be removed.\n" "\n" - "Assign the clocks to make sure they are properly configured\n" - "\n" - "Fixes: 50662499f911 (\"ARM64: dts: meson-gx: Use correct mmc clock source 0\")\n" - "Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>\n" - "Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>\n" - "Link: https://patch.msgid.link/20260114-amlogic-mmc-clocks-followup-v1-4-a999fafbe0aa@baylibre.com\n" - "Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>\n" - "Signed-off-by: Sasha Levin <sashal@kernel.org>\n" + "Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>\n" + "Link: https://lore.kernel.org/r/20251112232331.1566074-2-martin.lau@linux.dev\n" + "Signed-off-by: Alexei Starovoitov <ast@kernel.org>\n" + "Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>\n" + "---\n" + "Signed-off-by: Shung-Hsi Yu <shung-hsi.yu@suse.com>\n" "---\n" - " arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 9 +++++++++\n" - " arch/arm64/boot/dts/amlogic/meson-gxl.dtsi | 9 +++++++++\n" - " 2 files changed, 18 insertions(+)\n" + " tools/testing/selftests/bpf/prog_tests/check_mtu.c | 23 ++++++++++++++++++++-\n" + " tools/testing/selftests/bpf/progs/test_check_mtu.c | 12 ++++++++++\n" + " 2 files changed, 34 insertions(+), 1 deletion(-)\n" "\n" - "diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi\n" - "index f69923da07feb..a9c830a570cc6 100644\n" - "--- a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi\n" - "+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi\n" - "@@ -824,6 +824,9 @@ &sd_emmc_a {\n" - " \t\t <&clkc CLKID_FCLK_DIV2>;\n" - " \tclock-names = \"core\", \"clkin0\", \"clkin1\";\n" - " \tresets = <&reset RESET_SD_EMMC_A>;\n" - "+\n" - "+\tassigned-clocks = <&clkc CLKID_SD_EMMC_A_CLK0>;\n" - "+\tassigned-clock-rates = <24000000>;\n" - " };\n" + "--- a/tools/testing/selftests/bpf/prog_tests/check_mtu.c\n" + "+++ b/tools/testing/selftests/bpf/prog_tests/check_mtu.c\n" + "@@ -153,6 +153,26 @@ static void test_check_mtu_run_tc(struct\n" + " \tASSERT_EQ(mtu_result, mtu_expect, \"MTU-compare-user\");\n" + " }\n" " \n" - " &sd_emmc_b {\n" - "@@ -832,6 +835,9 @@ &sd_emmc_b {\n" - " \t\t <&clkc CLKID_FCLK_DIV2>;\n" - " \tclock-names = \"core\", \"clkin0\", \"clkin1\";\n" - " \tresets = <&reset RESET_SD_EMMC_B>;\n" + "+static void test_chk_segs_flag(struct test_check_mtu *skel, __u32 mtu)\n" + "+{\n" + "+\tint err, prog_fd = bpf_program__fd(skel->progs.tc_chk_segs_flag);\n" + "+\tstruct __sk_buff skb = {\n" + "+\t\t.gso_size = 10,\n" + "+\t};\n" + "+\tLIBBPF_OPTS(bpf_test_run_opts, topts,\n" + "+\t\t .data_in = &pkt_v4,\n" + "+\t\t .data_size_in = sizeof(pkt_v4),\n" + "+\t\t .ctx_in = &skb,\n" + "+\t\t .ctx_size_in = sizeof(skb),\n" + "+\t);\n" "+\n" - "+\tassigned-clocks = <&clkc CLKID_SD_EMMC_B_CLK0>;\n" - "+\tassigned-clock-rates = <24000000>;\n" - " };\n" + "+\t/* Lower the mtu to test the BPF_MTU_CHK_SEGS */\n" + "+\tSYS_NOFAIL(\"ip link set dev lo mtu 10\");\n" + "+\terr = bpf_prog_test_run_opts(prog_fd, &topts);\n" + "+\tSYS_NOFAIL(\"ip link set dev lo mtu %u\", mtu);\n" + "+\tASSERT_OK(err, \"test_run\");\n" + "+\tASSERT_EQ(topts.retval, BPF_OK, \"retval\");\n" + "+}\n" " \n" - " &sd_emmc_c {\n" - "@@ -840,6 +846,9 @@ &sd_emmc_c {\n" - " \t\t <&clkc CLKID_FCLK_DIV2>;\n" - " \tclock-names = \"core\", \"clkin0\", \"clkin1\";\n" - " \tresets = <&reset RESET_SD_EMMC_C>;\n" - "+\n" - "+\tassigned-clocks = <&clkc CLKID_SD_EMMC_C_CLK0>;\n" - "+\tassigned-clock-rates = <24000000>;\n" - " };\n" + " static void test_check_mtu_tc(__u32 mtu, __u32 ifindex)\n" + " {\n" + "@@ -177,11 +197,12 @@ static void test_check_mtu_tc(__u32 mtu,\n" + " \ttest_check_mtu_run_tc(skel, skel->progs.tc_minus_delta, mtu);\n" + " \ttest_check_mtu_run_tc(skel, skel->progs.tc_input_len, mtu);\n" + " \ttest_check_mtu_run_tc(skel, skel->progs.tc_input_len_exceed, mtu);\n" + "+\ttest_chk_segs_flag(skel, mtu);\n" + " cleanup:\n" + " \ttest_check_mtu__destroy(skel);\n" + " }\n" " \n" - " &simplefb_hdmi {\n" - "diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi\n" - "index ba535010a3c91..e202d84f06720 100644\n" - "--- a/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi\n" - "+++ b/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi\n" - "@@ -894,6 +894,9 @@ &sd_emmc_a {\n" - " \t\t <&clkc CLKID_FCLK_DIV2>;\n" - " \tclock-names = \"core\", \"clkin0\", \"clkin1\";\n" - " \tresets = <&reset RESET_SD_EMMC_A>;\n" - "+\n" - "+\tassigned-clocks = <&clkc CLKID_SD_EMMC_A_CLK0>;\n" - "+\tassigned-clock-rates = <24000000>;\n" - " };\n" + "-void serial_test_check_mtu(void)\n" + "+void test_ns_check_mtu(void)\n" + " {\n" + " \tint mtu_lo;\n" " \n" - " &sd_emmc_b {\n" - "@@ -902,6 +905,9 @@ &sd_emmc_b {\n" - " \t\t <&clkc CLKID_FCLK_DIV2>;\n" - " \tclock-names = \"core\", \"clkin0\", \"clkin1\";\n" - " \tresets = <&reset RESET_SD_EMMC_B>;\n" - "+\n" - "+\tassigned-clocks = <&clkc CLKID_SD_EMMC_B_CLK0>;\n" - "+\tassigned-clock-rates = <24000000>;\n" - " };\n" + "--- a/tools/testing/selftests/bpf/progs/test_check_mtu.c\n" + "+++ b/tools/testing/selftests/bpf/progs/test_check_mtu.c\n" + "@@ -7,6 +7,7 @@\n" " \n" - " &sd_emmc_c {\n" - "@@ -910,6 +916,9 @@ &sd_emmc_c {\n" - " \t\t <&clkc CLKID_FCLK_DIV2>;\n" - " \tclock-names = \"core\", \"clkin0\", \"clkin1\";\n" - " \tresets = <&reset RESET_SD_EMMC_C>;\n" - "+\n" - "+\tassigned-clocks = <&clkc CLKID_SD_EMMC_C_CLK0>;\n" - "+\tassigned-clock-rates = <24000000>;\n" - " };\n" + " #include <stddef.h>\n" + " #include <stdint.h>\n" + "+#include <errno.h>\n" + " \n" + " char _license[] SEC(\"license\") = \"GPL\";\n" " \n" - " &simplefb_hdmi {\n" - "-- \n" - 2.51.0 + "@@ -288,3 +289,14 @@ int tc_input_len_exceed(struct __sk_buff\n" + " \tglobal_bpf_mtu_xdp = mtu_len;\n" + " \treturn retval;\n" + " }\n" + "+\n" + "+SEC(\"tc\")\n" + "+int tc_chk_segs_flag(struct __sk_buff *ctx)\n" + "+{\n" + "+\t__u32 mtu_len = 0;\n" + "+\tint err;\n" + "+\n" + "+\terr = bpf_check_mtu(ctx, GLOBAL_USER_IFINDEX, &mtu_len, 0, BPF_MTU_CHK_SEGS);\n" + "+\n" + "+\treturn err == -EINVAL ? BPF_OK : BPF_DROP;\n" + +} -0782b2ec00cbcc467f7d70e916e35a7886bcc03a9dbc3d66fcad06ecdec176dc +fe2e6739d8d25d5d11b6c2c5b06ac44daec36b38087d919e6d1b8cadd7c4c83d
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.