diff options
-rw-r--r-- | queue-6.1/bpftool-fix-cgroup-command-to-only-show-cgroup-bpf-p.patch | 112 | ||||
-rw-r--r-- | queue-6.1/series | 1 | ||||
-rw-r--r-- | queue-6.12/bpftool-fix-cgroup-command-to-only-show-cgroup-bpf-p.patch | 112 | ||||
-rw-r--r-- | queue-6.12/series | 1 | ||||
-rw-r--r-- | queue-6.6/bpftool-fix-cgroup-command-to-only-show-cgroup-bpf-p.patch | 112 | ||||
-rw-r--r-- | queue-6.6/series | 1 |
6 files changed, 0 insertions, 339 deletions
diff --git a/queue-6.1/bpftool-fix-cgroup-command-to-only-show-cgroup-bpf-p.patch b/queue-6.1/bpftool-fix-cgroup-command-to-only-show-cgroup-bpf-p.patch deleted file mode 100644 index c81d3aa99d5..00000000000 --- a/queue-6.1/bpftool-fix-cgroup-command-to-only-show-cgroup-bpf-p.patch +++ /dev/null @@ -1,112 +0,0 @@ -From 8c1fd37afb7705ae17ecd47c8b21b2829ad93469 Mon Sep 17 00:00:00 2001 -From: Sasha Levin <sashal@kernel.org> -Date: Wed, 7 May 2025 13:32:32 -0700 -Subject: bpftool: Fix cgroup command to only show cgroup bpf programs - -From: Martin KaFai Lau <martin.lau@kernel.org> - -[ Upstream commit b69d4413aa1961930fbf9ffad8376d577378daf9 ] - -The netkit program is not a cgroup bpf program and should not be shown -in the output of the "bpftool cgroup show" command. - -However, if the netkit device happens to have ifindex 3, -the "bpftool cgroup show" command will output the netkit -bpf program as well: - -> ip -d link show dev nk1 -3: nk1@if2: ... - link/ether ... - netkit mode ... - -> bpftool net show -tc: -nk1(3) netkit/peer tw_ns_nk2phy prog_id 469447 - -> bpftool cgroup show /sys/fs/cgroup/... -ID AttachType AttachFlags Name -... ... ... -469447 netkit_peer tw_ns_nk2phy - -The reason is that the target_fd (which is the cgroup_fd here) and -the target_ifindex are in a union in the uapi/linux/bpf.h. The bpftool -iterates all values in "enum bpf_attach_type" which includes -non cgroup attach types like netkit. The cgroup_fd is usually 3 here, -so the bug is triggered when the netkit ifindex just happens -to be 3 as well. - -The bpftool's cgroup.c already has a list of cgroup-only attach type -defined in "cgroup_attach_types[]". This patch fixes it by iterating -over "cgroup_attach_types[]" instead of "__MAX_BPF_ATTACH_TYPE". - -Cc: Quentin Monnet <qmo@kernel.org> -Reported-by: Takshak Chahande <ctakshak@meta.com> -Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org> -Acked-by: Daniel Borkmann <daniel@iogearbox.net> -Reviewed-by: Quentin Monnet <qmo@kernel.org> -Link: https://lore.kernel.org/r/20250507203232.1420762-1-martin.lau@linux.dev -Signed-off-by: Alexei Starovoitov <ast@kernel.org> -Signed-off-by: Sasha Levin <sashal@kernel.org> ---- - tools/bpf/bpftool/cgroup.c | 12 ++++++------ - 1 file changed, 6 insertions(+), 6 deletions(-) - -diff --git a/tools/bpf/bpftool/cgroup.c b/tools/bpf/bpftool/cgroup.c -index b46a998d8f8df..d157f58ec7d5a 100644 ---- a/tools/bpf/bpftool/cgroup.c -+++ b/tools/bpf/bpftool/cgroup.c -@@ -284,11 +284,11 @@ static int show_bpf_progs(int cgroup_fd, enum bpf_attach_type type, - - static int do_show(int argc, char **argv) - { -- enum bpf_attach_type type; - int has_attached_progs; - const char *path; - int cgroup_fd; - int ret = -1; -+ unsigned int i; - - query_flags = 0; - -@@ -336,14 +336,14 @@ static int do_show(int argc, char **argv) - "AttachFlags", "Name"); - - btf_vmlinux = libbpf_find_kernel_btf(); -- for (type = 0; type < __MAX_BPF_ATTACH_TYPE; type++) { -+ for (i = 0; i < ARRAY_SIZE(cgroup_attach_types); i++) { - /* - * Not all attach types may be supported, so it's expected, - * that some requests will fail. - * If we were able to get the show for at least one - * attach type, let's return 0. - */ -- if (show_bpf_progs(cgroup_fd, type, 0) == 0) -+ if (show_bpf_progs(cgroup_fd, cgroup_attach_types[i], 0) == 0) - ret = 0; - } - -@@ -366,9 +366,9 @@ static int do_show(int argc, char **argv) - static int do_show_tree_fn(const char *fpath, const struct stat *sb, - int typeflag, struct FTW *ftw) - { -- enum bpf_attach_type type; - int has_attached_progs; - int cgroup_fd; -+ unsigned int i; - - if (typeflag != FTW_D) - return 0; -@@ -400,8 +400,8 @@ static int do_show_tree_fn(const char *fpath, const struct stat *sb, - } - - btf_vmlinux = libbpf_find_kernel_btf(); -- for (type = 0; type < __MAX_BPF_ATTACH_TYPE; type++) -- show_bpf_progs(cgroup_fd, type, ftw->level); -+ for (i = 0; i < ARRAY_SIZE(cgroup_attach_types); i++) -+ show_bpf_progs(cgroup_fd, cgroup_attach_types[i], ftw->level); - - if (errno == EINVAL) - /* Last attach type does not support query. --- -2.39.5 - diff --git a/queue-6.1/series b/queue-6.1/series index 55c22134cec..92e8578ec0f 100644 --- a/queue-6.1/series +++ b/queue-6.1/series @@ -411,7 +411,6 @@ net-mlx4-add-sof_timestamping_tx_software-flag-when-.patch net-vertexcom-mse102x-return-code-for-mse102x_rx_pkt.patch wireless-purelifi-plfxlc-fix-memory-leak-in-plfxlc_u.patch wifi-mac80211-do-not-offer-a-mesh-path-if-forwarding.patch -bpftool-fix-cgroup-command-to-only-show-cgroup-bpf-p.patch clk-rockchip-rk3036-mark-ddrphy-as-critical.patch libbpf-add-identical-pointer-detection-to-btf_dedup_.patch scsi-lpfc-fix-lpfc_check_sli_ndlp-handling-for-gen_r.patch diff --git a/queue-6.12/bpftool-fix-cgroup-command-to-only-show-cgroup-bpf-p.patch b/queue-6.12/bpftool-fix-cgroup-command-to-only-show-cgroup-bpf-p.patch deleted file mode 100644 index cc220e0217c..00000000000 --- a/queue-6.12/bpftool-fix-cgroup-command-to-only-show-cgroup-bpf-p.patch +++ /dev/null @@ -1,112 +0,0 @@ -From 3f22007bc6b9e556aa4b841af3aa990cfd74d62d Mon Sep 17 00:00:00 2001 -From: Sasha Levin <sashal@kernel.org> -Date: Wed, 7 May 2025 13:32:32 -0700 -Subject: bpftool: Fix cgroup command to only show cgroup bpf programs - -From: Martin KaFai Lau <martin.lau@kernel.org> - -[ Upstream commit b69d4413aa1961930fbf9ffad8376d577378daf9 ] - -The netkit program is not a cgroup bpf program and should not be shown -in the output of the "bpftool cgroup show" command. - -However, if the netkit device happens to have ifindex 3, -the "bpftool cgroup show" command will output the netkit -bpf program as well: - -> ip -d link show dev nk1 -3: nk1@if2: ... - link/ether ... - netkit mode ... - -> bpftool net show -tc: -nk1(3) netkit/peer tw_ns_nk2phy prog_id 469447 - -> bpftool cgroup show /sys/fs/cgroup/... -ID AttachType AttachFlags Name -... ... ... -469447 netkit_peer tw_ns_nk2phy - -The reason is that the target_fd (which is the cgroup_fd here) and -the target_ifindex are in a union in the uapi/linux/bpf.h. The bpftool -iterates all values in "enum bpf_attach_type" which includes -non cgroup attach types like netkit. The cgroup_fd is usually 3 here, -so the bug is triggered when the netkit ifindex just happens -to be 3 as well. - -The bpftool's cgroup.c already has a list of cgroup-only attach type -defined in "cgroup_attach_types[]". This patch fixes it by iterating -over "cgroup_attach_types[]" instead of "__MAX_BPF_ATTACH_TYPE". - -Cc: Quentin Monnet <qmo@kernel.org> -Reported-by: Takshak Chahande <ctakshak@meta.com> -Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org> -Acked-by: Daniel Borkmann <daniel@iogearbox.net> -Reviewed-by: Quentin Monnet <qmo@kernel.org> -Link: https://lore.kernel.org/r/20250507203232.1420762-1-martin.lau@linux.dev -Signed-off-by: Alexei Starovoitov <ast@kernel.org> -Signed-off-by: Sasha Levin <sashal@kernel.org> ---- - tools/bpf/bpftool/cgroup.c | 12 ++++++------ - 1 file changed, 6 insertions(+), 6 deletions(-) - -diff --git a/tools/bpf/bpftool/cgroup.c b/tools/bpf/bpftool/cgroup.c -index afab728468bf6..4189c9d74fb06 100644 ---- a/tools/bpf/bpftool/cgroup.c -+++ b/tools/bpf/bpftool/cgroup.c -@@ -318,11 +318,11 @@ static int show_bpf_progs(int cgroup_fd, enum bpf_attach_type type, - - static int do_show(int argc, char **argv) - { -- enum bpf_attach_type type; - int has_attached_progs; - const char *path; - int cgroup_fd; - int ret = -1; -+ unsigned int i; - - query_flags = 0; - -@@ -370,14 +370,14 @@ static int do_show(int argc, char **argv) - "AttachFlags", "Name"); - - btf_vmlinux = libbpf_find_kernel_btf(); -- for (type = 0; type < __MAX_BPF_ATTACH_TYPE; type++) { -+ for (i = 0; i < ARRAY_SIZE(cgroup_attach_types); i++) { - /* - * Not all attach types may be supported, so it's expected, - * that some requests will fail. - * If we were able to get the show for at least one - * attach type, let's return 0. - */ -- if (show_bpf_progs(cgroup_fd, type, 0) == 0) -+ if (show_bpf_progs(cgroup_fd, cgroup_attach_types[i], 0) == 0) - ret = 0; - } - -@@ -400,9 +400,9 @@ static int do_show(int argc, char **argv) - static int do_show_tree_fn(const char *fpath, const struct stat *sb, - int typeflag, struct FTW *ftw) - { -- enum bpf_attach_type type; - int has_attached_progs; - int cgroup_fd; -+ unsigned int i; - - if (typeflag != FTW_D) - return 0; -@@ -434,8 +434,8 @@ static int do_show_tree_fn(const char *fpath, const struct stat *sb, - } - - btf_vmlinux = libbpf_find_kernel_btf(); -- for (type = 0; type < __MAX_BPF_ATTACH_TYPE; type++) -- show_bpf_progs(cgroup_fd, type, ftw->level); -+ for (i = 0; i < ARRAY_SIZE(cgroup_attach_types); i++) -+ show_bpf_progs(cgroup_fd, cgroup_attach_types[i], ftw->level); - - if (errno == EINVAL) - /* Last attach type does not support query. --- -2.39.5 - diff --git a/queue-6.12/series b/queue-6.12/series index e63740e55b5..9461c8d6ca2 100644 --- a/queue-6.12/series +++ b/queue-6.12/series @@ -233,7 +233,6 @@ net-mlx4-add-sof_timestamping_tx_software-flag-when-.patch net-vertexcom-mse102x-return-code-for-mse102x_rx_pkt.patch wireless-purelifi-plfxlc-fix-memory-leak-in-plfxlc_u.patch wifi-mac80211-do-not-offer-a-mesh-path-if-forwarding.patch -bpftool-fix-cgroup-command-to-only-show-cgroup-bpf-p.patch clk-rockchip-rk3036-mark-ddrphy-as-critical.patch hid-asus-check-rog-ally-mcu-version-and-warn.patch wifi-iwlwifi-mvm-fix-beacon-cck-flag.patch diff --git a/queue-6.6/bpftool-fix-cgroup-command-to-only-show-cgroup-bpf-p.patch b/queue-6.6/bpftool-fix-cgroup-command-to-only-show-cgroup-bpf-p.patch deleted file mode 100644 index 692c4585ce8..00000000000 --- a/queue-6.6/bpftool-fix-cgroup-command-to-only-show-cgroup-bpf-p.patch +++ /dev/null @@ -1,112 +0,0 @@ -From b41168dd96898a5090c82df26a3ed10084493576 Mon Sep 17 00:00:00 2001 -From: Sasha Levin <sashal@kernel.org> -Date: Wed, 7 May 2025 13:32:32 -0700 -Subject: bpftool: Fix cgroup command to only show cgroup bpf programs - -From: Martin KaFai Lau <martin.lau@kernel.org> - -[ Upstream commit b69d4413aa1961930fbf9ffad8376d577378daf9 ] - -The netkit program is not a cgroup bpf program and should not be shown -in the output of the "bpftool cgroup show" command. - -However, if the netkit device happens to have ifindex 3, -the "bpftool cgroup show" command will output the netkit -bpf program as well: - -> ip -d link show dev nk1 -3: nk1@if2: ... - link/ether ... - netkit mode ... - -> bpftool net show -tc: -nk1(3) netkit/peer tw_ns_nk2phy prog_id 469447 - -> bpftool cgroup show /sys/fs/cgroup/... -ID AttachType AttachFlags Name -... ... ... -469447 netkit_peer tw_ns_nk2phy - -The reason is that the target_fd (which is the cgroup_fd here) and -the target_ifindex are in a union in the uapi/linux/bpf.h. The bpftool -iterates all values in "enum bpf_attach_type" which includes -non cgroup attach types like netkit. The cgroup_fd is usually 3 here, -so the bug is triggered when the netkit ifindex just happens -to be 3 as well. - -The bpftool's cgroup.c already has a list of cgroup-only attach type -defined in "cgroup_attach_types[]". This patch fixes it by iterating -over "cgroup_attach_types[]" instead of "__MAX_BPF_ATTACH_TYPE". - -Cc: Quentin Monnet <qmo@kernel.org> -Reported-by: Takshak Chahande <ctakshak@meta.com> -Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org> -Acked-by: Daniel Borkmann <daniel@iogearbox.net> -Reviewed-by: Quentin Monnet <qmo@kernel.org> -Link: https://lore.kernel.org/r/20250507203232.1420762-1-martin.lau@linux.dev -Signed-off-by: Alexei Starovoitov <ast@kernel.org> -Signed-off-by: Sasha Levin <sashal@kernel.org> ---- - tools/bpf/bpftool/cgroup.c | 12 ++++++------ - 1 file changed, 6 insertions(+), 6 deletions(-) - -diff --git a/tools/bpf/bpftool/cgroup.c b/tools/bpf/bpftool/cgroup.c -index ac846b0805b45..322490239166f 100644 ---- a/tools/bpf/bpftool/cgroup.c -+++ b/tools/bpf/bpftool/cgroup.c -@@ -284,11 +284,11 @@ static int show_bpf_progs(int cgroup_fd, enum bpf_attach_type type, - - static int do_show(int argc, char **argv) - { -- enum bpf_attach_type type; - int has_attached_progs; - const char *path; - int cgroup_fd; - int ret = -1; -+ unsigned int i; - - query_flags = 0; - -@@ -336,14 +336,14 @@ static int do_show(int argc, char **argv) - "AttachFlags", "Name"); - - btf_vmlinux = libbpf_find_kernel_btf(); -- for (type = 0; type < __MAX_BPF_ATTACH_TYPE; type++) { -+ for (i = 0; i < ARRAY_SIZE(cgroup_attach_types); i++) { - /* - * Not all attach types may be supported, so it's expected, - * that some requests will fail. - * If we were able to get the show for at least one - * attach type, let's return 0. - */ -- if (show_bpf_progs(cgroup_fd, type, 0) == 0) -+ if (show_bpf_progs(cgroup_fd, cgroup_attach_types[i], 0) == 0) - ret = 0; - } - -@@ -366,9 +366,9 @@ static int do_show(int argc, char **argv) - static int do_show_tree_fn(const char *fpath, const struct stat *sb, - int typeflag, struct FTW *ftw) - { -- enum bpf_attach_type type; - int has_attached_progs; - int cgroup_fd; -+ unsigned int i; - - if (typeflag != FTW_D) - return 0; -@@ -400,8 +400,8 @@ static int do_show_tree_fn(const char *fpath, const struct stat *sb, - } - - btf_vmlinux = libbpf_find_kernel_btf(); -- for (type = 0; type < __MAX_BPF_ATTACH_TYPE; type++) -- show_bpf_progs(cgroup_fd, type, ftw->level); -+ for (i = 0; i < ARRAY_SIZE(cgroup_attach_types); i++) -+ show_bpf_progs(cgroup_fd, cgroup_attach_types[i], ftw->level); - - if (errno == EINVAL) - /* Last attach type does not support query. --- -2.39.5 - diff --git a/queue-6.6/series b/queue-6.6/series index c574e7b6eb9..bc358f07d3f 100644 --- a/queue-6.6/series +++ b/queue-6.6/series @@ -161,7 +161,6 @@ net-mlx4-add-sof_timestamping_tx_software-flag-when-.patch net-vertexcom-mse102x-return-code-for-mse102x_rx_pkt.patch wireless-purelifi-plfxlc-fix-memory-leak-in-plfxlc_u.patch wifi-mac80211-do-not-offer-a-mesh-path-if-forwarding.patch -bpftool-fix-cgroup-command-to-only-show-cgroup-bpf-p.patch clk-rockchip-rk3036-mark-ddrphy-as-critical.patch libbpf-add-identical-pointer-detection-to-btf_dedup_.patch scsi-lpfc-fix-lpfc_check_sli_ndlp-handling-for-gen_r.patch |