From: Greg Kroah-Hartman Date: Thu, 10 Oct 2024 09:25:30 +0000 (+0200) Subject: drop cgroup patch X-Git-Tag: v6.6.55~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a7785021f3aa90ac168d0bfde7f48d63f47a7012;p=thirdparty%2Fkernel%2Fstable-queue.git drop cgroup patch --- diff --git a/queue-5.10/cgroup-disallow-mounting-v1-hierarchies-without-cont.patch b/queue-5.10/cgroup-disallow-mounting-v1-hierarchies-without-cont.patch deleted file mode 100644 index c0ad17ef095..00000000000 --- a/queue-5.10/cgroup-disallow-mounting-v1-hierarchies-without-cont.patch +++ /dev/null @@ -1,71 +0,0 @@ -From 9b6c011f44b1cef78313687212c19135f4a2ba25 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Mon, 9 Sep 2024 18:32:22 +0200 -Subject: cgroup: Disallow mounting v1 hierarchies without controller - implementation -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -From: Michal Koutný - -[ Upstream commit 3c41382e920f1dd5c9f432948fe799c07af1cced ] - -The configs that disable some v1 controllers would still allow mounting -them but with no controller-specific files. (Making such hierarchies -equivalent to named v1 hierarchies.) To achieve behavior consistent with -actual out-compilation of a whole controller, the mounts should treat -respective controllers as non-existent. - -Wrap implementation into a helper function, leverage legacy_files to -detect compiled out controllers. The effect is that mounts on v1 would -fail and produce a message like: - [ 1543.999081] cgroup: Unknown subsys name 'memory' - -Signed-off-by: Michal Koutný -Signed-off-by: Tejun Heo -Signed-off-by: Sasha Levin ---- - kernel/cgroup/cgroup-v1.c | 12 ++++++++++-- - 1 file changed, 10 insertions(+), 2 deletions(-) - -diff --git a/kernel/cgroup/cgroup-v1.c b/kernel/cgroup/cgroup-v1.c -index b044ce3026eb6..e183d39cf85cc 100644 ---- a/kernel/cgroup/cgroup-v1.c -+++ b/kernel/cgroup/cgroup-v1.c -@@ -46,6 +46,12 @@ bool cgroup1_ssid_disabled(int ssid) - return cgroup_no_v1_mask & (1 << ssid); - } - -+static bool cgroup1_subsys_absent(struct cgroup_subsys *ss) -+{ -+ /* Check also dfl_cftypes for file-less controllers, i.e. perf_event */ -+ return ss->legacy_cftypes == NULL && ss->dfl_cftypes; -+} -+ - /** - * cgroup_attach_task_all - attach task 'tsk' to all cgroups of task 'from' - * @from: attach to all cgroups of a given task -@@ -935,7 +941,8 @@ int cgroup1_parse_param(struct fs_context *fc, struct fs_parameter *param) - return 0; - } - for_each_subsys(ss, i) { -- if (strcmp(param->key, ss->legacy_name)) -+ if (strcmp(param->key, ss->legacy_name) || -+ cgroup1_subsys_absent(ss)) - continue; - if (!cgroup_ssid_enabled(i) || cgroup1_ssid_disabled(i)) - return invalfc(fc, "Disabled controller '%s'", -@@ -1021,7 +1028,8 @@ static int check_cgroupfs_options(struct fs_context *fc) - mask = ~((u16)1 << cpuset_cgrp_id); - #endif - for_each_subsys(ss, i) -- if (cgroup_ssid_enabled(i) && !cgroup1_ssid_disabled(i)) -+ if (cgroup_ssid_enabled(i) && !cgroup1_ssid_disabled(i) && -+ !cgroup1_subsys_absent(ss)) - enabled |= 1 << i; - - ctx->subsys_mask &= enabled; --- -2.43.0 - diff --git a/queue-5.10/series b/queue-5.10/series index 9bfeb97e683..49f3487ee6b 100644 --- a/queue-5.10/series +++ b/queue-5.10/series @@ -332,7 +332,6 @@ iommu-arm-smmu-qcom-hide-last-lpass-smmu-context-ban.patch power-reset-brcmstb-do-not-go-into-infinite-loop-if-.patch iommu-vt-d-always-reserve-a-domain-id-for-identity-s.patch iommu-vt-d-fix-potential-lockup-if-qi_submit_sync-ca.patch -cgroup-disallow-mounting-v1-hierarchies-without-cont.patch drm-amd-display-add-null-check-for-top_pipe_to_progr.patch ata-sata_sil-rename-sil_blacklist-to-sil_quirks.patch drm-amd-display-check-null-pointers-before-using-dc-.patch diff --git a/queue-5.15/cgroup-disallow-mounting-v1-hierarchies-without-cont.patch b/queue-5.15/cgroup-disallow-mounting-v1-hierarchies-without-cont.patch deleted file mode 100644 index 959962a4b6f..00000000000 --- a/queue-5.15/cgroup-disallow-mounting-v1-hierarchies-without-cont.patch +++ /dev/null @@ -1,71 +0,0 @@ -From 4ae8f436f32ddcd5381588c65ef1da960a7e672f Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Mon, 9 Sep 2024 18:32:22 +0200 -Subject: cgroup: Disallow mounting v1 hierarchies without controller - implementation -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -From: Michal Koutný - -[ Upstream commit 3c41382e920f1dd5c9f432948fe799c07af1cced ] - -The configs that disable some v1 controllers would still allow mounting -them but with no controller-specific files. (Making such hierarchies -equivalent to named v1 hierarchies.) To achieve behavior consistent with -actual out-compilation of a whole controller, the mounts should treat -respective controllers as non-existent. - -Wrap implementation into a helper function, leverage legacy_files to -detect compiled out controllers. The effect is that mounts on v1 would -fail and produce a message like: - [ 1543.999081] cgroup: Unknown subsys name 'memory' - -Signed-off-by: Michal Koutný -Signed-off-by: Tejun Heo -Signed-off-by: Sasha Levin ---- - kernel/cgroup/cgroup-v1.c | 12 ++++++++++-- - 1 file changed, 10 insertions(+), 2 deletions(-) - -diff --git a/kernel/cgroup/cgroup-v1.c b/kernel/cgroup/cgroup-v1.c -index 1292bc8449458..e0559d119ef71 100644 ---- a/kernel/cgroup/cgroup-v1.c -+++ b/kernel/cgroup/cgroup-v1.c -@@ -46,6 +46,12 @@ bool cgroup1_ssid_disabled(int ssid) - return cgroup_no_v1_mask & (1 << ssid); - } - -+static bool cgroup1_subsys_absent(struct cgroup_subsys *ss) -+{ -+ /* Check also dfl_cftypes for file-less controllers, i.e. perf_event */ -+ return ss->legacy_cftypes == NULL && ss->dfl_cftypes; -+} -+ - /** - * cgroup_attach_task_all - attach task 'tsk' to all cgroups of task 'from' - * @from: attach to all cgroups of a given task -@@ -937,7 +943,8 @@ int cgroup1_parse_param(struct fs_context *fc, struct fs_parameter *param) - if (ret != -ENOPARAM) - return ret; - for_each_subsys(ss, i) { -- if (strcmp(param->key, ss->legacy_name)) -+ if (strcmp(param->key, ss->legacy_name) || -+ cgroup1_subsys_absent(ss)) - continue; - if (!cgroup_ssid_enabled(i) || cgroup1_ssid_disabled(i)) - return invalfc(fc, "Disabled controller '%s'", -@@ -1023,7 +1030,8 @@ static int check_cgroupfs_options(struct fs_context *fc) - mask = ~((u16)1 << cpuset_cgrp_id); - #endif - for_each_subsys(ss, i) -- if (cgroup_ssid_enabled(i) && !cgroup1_ssid_disabled(i)) -+ if (cgroup_ssid_enabled(i) && !cgroup1_ssid_disabled(i) && -+ !cgroup1_subsys_absent(ss)) - enabled |= 1 << i; - - ctx->subsys_mask &= enabled; --- -2.43.0 - diff --git a/queue-5.15/series b/queue-5.15/series index f2edb1aa896..c99729724d6 100644 --- a/queue-5.15/series +++ b/queue-5.15/series @@ -448,7 +448,6 @@ iommu-arm-smmu-qcom-hide-last-lpass-smmu-context-ban.patch power-reset-brcmstb-do-not-go-into-infinite-loop-if-.patch iommu-vt-d-always-reserve-a-domain-id-for-identity-s.patch iommu-vt-d-fix-potential-lockup-if-qi_submit_sync-ca.patch -cgroup-disallow-mounting-v1-hierarchies-without-cont.patch drm-amd-display-add-null-check-for-top_pipe_to_progr.patch ata-sata_sil-rename-sil_blacklist-to-sil_quirks.patch drm-amd-display-check-null-pointers-before-using-dc-.patch diff --git a/queue-5.4/cgroup-disallow-mounting-v1-hierarchies-without-cont.patch b/queue-5.4/cgroup-disallow-mounting-v1-hierarchies-without-cont.patch deleted file mode 100644 index fd878e2fa3b..00000000000 --- a/queue-5.4/cgroup-disallow-mounting-v1-hierarchies-without-cont.patch +++ /dev/null @@ -1,71 +0,0 @@ -From f699419da0a29505961b03d8b99acfee53672d60 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Mon, 9 Sep 2024 18:32:22 +0200 -Subject: cgroup: Disallow mounting v1 hierarchies without controller - implementation -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -From: Michal Koutný - -[ Upstream commit 3c41382e920f1dd5c9f432948fe799c07af1cced ] - -The configs that disable some v1 controllers would still allow mounting -them but with no controller-specific files. (Making such hierarchies -equivalent to named v1 hierarchies.) To achieve behavior consistent with -actual out-compilation of a whole controller, the mounts should treat -respective controllers as non-existent. - -Wrap implementation into a helper function, leverage legacy_files to -detect compiled out controllers. The effect is that mounts on v1 would -fail and produce a message like: - [ 1543.999081] cgroup: Unknown subsys name 'memory' - -Signed-off-by: Michal Koutný -Signed-off-by: Tejun Heo -Signed-off-by: Sasha Levin ---- - kernel/cgroup/cgroup-v1.c | 12 ++++++++++-- - 1 file changed, 10 insertions(+), 2 deletions(-) - -diff --git a/kernel/cgroup/cgroup-v1.c b/kernel/cgroup/cgroup-v1.c -index 6fcabeacb7d87..489cd784dc939 100644 ---- a/kernel/cgroup/cgroup-v1.c -+++ b/kernel/cgroup/cgroup-v1.c -@@ -52,6 +52,12 @@ bool cgroup1_ssid_disabled(int ssid) - return cgroup_no_v1_mask & (1 << ssid); - } - -+static bool cgroup1_subsys_absent(struct cgroup_subsys *ss) -+{ -+ /* Check also dfl_cftypes for file-less controllers, i.e. perf_event */ -+ return ss->legacy_cftypes == NULL && ss->dfl_cftypes; -+} -+ - /** - * cgroup_attach_task_all - attach task 'tsk' to all cgroups of task 'from' - * @from: attach to all cgroups of a given task -@@ -941,7 +947,8 @@ int cgroup1_parse_param(struct fs_context *fc, struct fs_parameter *param) - return 0; - } - for_each_subsys(ss, i) { -- if (strcmp(param->key, ss->legacy_name)) -+ if (strcmp(param->key, ss->legacy_name) || -+ cgroup1_subsys_absent(ss)) - continue; - if (!cgroup_ssid_enabled(i) || cgroup1_ssid_disabled(i)) - return invalf(fc, "Disabled controller '%s'", -@@ -1027,7 +1034,8 @@ static int check_cgroupfs_options(struct fs_context *fc) - mask = ~((u16)1 << cpuset_cgrp_id); - #endif - for_each_subsys(ss, i) -- if (cgroup_ssid_enabled(i) && !cgroup1_ssid_disabled(i)) -+ if (cgroup_ssid_enabled(i) && !cgroup1_ssid_disabled(i) && -+ !cgroup1_subsys_absent(ss)) - enabled |= 1 << i; - - ctx->subsys_mask &= enabled; --- -2.43.0 - diff --git a/queue-5.4/series b/queue-5.4/series index d8d6ff010d5..bf9c20cf01b 100644 --- a/queue-5.4/series +++ b/queue-5.4/series @@ -223,7 +223,6 @@ alsa-hdsp-break-infinite-midi-input-flush-loop.patch x86-syscall-avoid-memcpy-for-ia32-syscall_get_argume.patch fbdev-pxafb-fix-possible-use-after-free-in-pxafb_tas.patch power-reset-brcmstb-do-not-go-into-infinite-loop-if-.patch -cgroup-disallow-mounting-v1-hierarchies-without-cont.patch ata-sata_sil-rename-sil_blacklist-to-sil_quirks.patch jfs-ubsan-shift-out-of-bounds-in-dbfindbits.patch jfs-fix-uaf-in-dbfreebits.patch diff --git a/queue-6.1/cgroup-disallow-mounting-v1-hierarchies-without-cont.patch b/queue-6.1/cgroup-disallow-mounting-v1-hierarchies-without-cont.patch deleted file mode 100644 index 67bd2c4c650..00000000000 --- a/queue-6.1/cgroup-disallow-mounting-v1-hierarchies-without-cont.patch +++ /dev/null @@ -1,71 +0,0 @@ -From a235525004b0e70293fb65cbc467b063029d4ebe Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Mon, 9 Sep 2024 18:32:22 +0200 -Subject: cgroup: Disallow mounting v1 hierarchies without controller - implementation -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -From: Michal Koutný - -[ Upstream commit 3c41382e920f1dd5c9f432948fe799c07af1cced ] - -The configs that disable some v1 controllers would still allow mounting -them but with no controller-specific files. (Making such hierarchies -equivalent to named v1 hierarchies.) To achieve behavior consistent with -actual out-compilation of a whole controller, the mounts should treat -respective controllers as non-existent. - -Wrap implementation into a helper function, leverage legacy_files to -detect compiled out controllers. The effect is that mounts on v1 would -fail and produce a message like: - [ 1543.999081] cgroup: Unknown subsys name 'memory' - -Signed-off-by: Michal Koutný -Signed-off-by: Tejun Heo -Signed-off-by: Sasha Levin ---- - kernel/cgroup/cgroup-v1.c | 12 ++++++++++-- - 1 file changed, 10 insertions(+), 2 deletions(-) - -diff --git a/kernel/cgroup/cgroup-v1.c b/kernel/cgroup/cgroup-v1.c -index c2d28ffee3b7b..6ce0674cff282 100644 ---- a/kernel/cgroup/cgroup-v1.c -+++ b/kernel/cgroup/cgroup-v1.c -@@ -46,6 +46,12 @@ bool cgroup1_ssid_disabled(int ssid) - return cgroup_no_v1_mask & (1 << ssid); - } - -+static bool cgroup1_subsys_absent(struct cgroup_subsys *ss) -+{ -+ /* Check also dfl_cftypes for file-less controllers, i.e. perf_event */ -+ return ss->legacy_cftypes == NULL && ss->dfl_cftypes; -+} -+ - /** - * cgroup_attach_task_all - attach task 'tsk' to all cgroups of task 'from' - * @from: attach to all cgroups of a given task -@@ -932,7 +938,8 @@ int cgroup1_parse_param(struct fs_context *fc, struct fs_parameter *param) - if (ret != -ENOPARAM) - return ret; - for_each_subsys(ss, i) { -- if (strcmp(param->key, ss->legacy_name)) -+ if (strcmp(param->key, ss->legacy_name) || -+ cgroup1_subsys_absent(ss)) - continue; - if (!cgroup_ssid_enabled(i) || cgroup1_ssid_disabled(i)) - return invalfc(fc, "Disabled controller '%s'", -@@ -1024,7 +1031,8 @@ static int check_cgroupfs_options(struct fs_context *fc) - mask = ~((u16)1 << cpuset_cgrp_id); - #endif - for_each_subsys(ss, i) -- if (cgroup_ssid_enabled(i) && !cgroup1_ssid_disabled(i)) -+ if (cgroup_ssid_enabled(i) && !cgroup1_ssid_disabled(i) && -+ !cgroup1_subsys_absent(ss)) - enabled |= 1 << i; - - ctx->subsys_mask &= enabled; --- -2.43.0 - diff --git a/queue-6.1/series b/queue-6.1/series index 770f03e36d4..7e1f15a017c 100644 --- a/queue-6.1/series +++ b/queue-6.1/series @@ -469,7 +469,6 @@ iommu-arm-smmu-qcom-hide-last-lpass-smmu-context-ban.patch power-reset-brcmstb-do-not-go-into-infinite-loop-if-.patch iommu-vt-d-always-reserve-a-domain-id-for-identity-s.patch iommu-vt-d-fix-potential-lockup-if-qi_submit_sync-ca.patch -cgroup-disallow-mounting-v1-hierarchies-without-cont.patch drm-stm-avoid-use-after-free-issues-with-crtc-and-pl.patch drm-amdgpu-disallow-multiple-bo_handles-chunks-in-on.patch drm-amd-display-add-null-check-for-top_pipe_to_progr.patch diff --git a/queue-6.10/cgroup-disallow-mounting-v1-hierarchies-without-cont.patch b/queue-6.10/cgroup-disallow-mounting-v1-hierarchies-without-cont.patch deleted file mode 100644 index 90011fba4d7..00000000000 --- a/queue-6.10/cgroup-disallow-mounting-v1-hierarchies-without-cont.patch +++ /dev/null @@ -1,71 +0,0 @@ -From f9571e8ad38d9421f6495a889213df68eaebc9ae Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Mon, 9 Sep 2024 18:32:22 +0200 -Subject: cgroup: Disallow mounting v1 hierarchies without controller - implementation -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -From: Michal Koutný - -[ Upstream commit 3c41382e920f1dd5c9f432948fe799c07af1cced ] - -The configs that disable some v1 controllers would still allow mounting -them but with no controller-specific files. (Making such hierarchies -equivalent to named v1 hierarchies.) To achieve behavior consistent with -actual out-compilation of a whole controller, the mounts should treat -respective controllers as non-existent. - -Wrap implementation into a helper function, leverage legacy_files to -detect compiled out controllers. The effect is that mounts on v1 would -fail and produce a message like: - [ 1543.999081] cgroup: Unknown subsys name 'memory' - -Signed-off-by: Michal Koutný -Signed-off-by: Tejun Heo -Signed-off-by: Sasha Levin ---- - kernel/cgroup/cgroup-v1.c | 12 ++++++++++-- - 1 file changed, 10 insertions(+), 2 deletions(-) - -diff --git a/kernel/cgroup/cgroup-v1.c b/kernel/cgroup/cgroup-v1.c -index b9dbf6bf2779d..784337694a4be 100644 ---- a/kernel/cgroup/cgroup-v1.c -+++ b/kernel/cgroup/cgroup-v1.c -@@ -46,6 +46,12 @@ bool cgroup1_ssid_disabled(int ssid) - return cgroup_no_v1_mask & (1 << ssid); - } - -+static bool cgroup1_subsys_absent(struct cgroup_subsys *ss) -+{ -+ /* Check also dfl_cftypes for file-less controllers, i.e. perf_event */ -+ return ss->legacy_cftypes == NULL && ss->dfl_cftypes; -+} -+ - /** - * cgroup_attach_task_all - attach task 'tsk' to all cgroups of task 'from' - * @from: attach to all cgroups of a given task -@@ -932,7 +938,8 @@ int cgroup1_parse_param(struct fs_context *fc, struct fs_parameter *param) - if (ret != -ENOPARAM) - return ret; - for_each_subsys(ss, i) { -- if (strcmp(param->key, ss->legacy_name)) -+ if (strcmp(param->key, ss->legacy_name) || -+ cgroup1_subsys_absent(ss)) - continue; - if (!cgroup_ssid_enabled(i) || cgroup1_ssid_disabled(i)) - return invalfc(fc, "Disabled controller '%s'", -@@ -1024,7 +1031,8 @@ static int check_cgroupfs_options(struct fs_context *fc) - mask = ~((u16)1 << cpuset_cgrp_id); - #endif - for_each_subsys(ss, i) -- if (cgroup_ssid_enabled(i) && !cgroup1_ssid_disabled(i)) -+ if (cgroup_ssid_enabled(i) && !cgroup1_ssid_disabled(i) && -+ !cgroup1_subsys_absent(ss)) - enabled |= 1 << i; - - ctx->subsys_mask &= enabled; --- -2.43.0 - diff --git a/queue-6.10/series b/queue-6.10/series index c011b7d31ed..80930153fb1 100644 --- a/queue-6.10/series +++ b/queue-6.10/series @@ -168,7 +168,6 @@ iommu-vt-d-always-reserve-a-domain-id-for-identity-s.patch iommu-vt-d-fix-potential-lockup-if-qi_submit_sync-ca.patch iommu-vt-d-unconditionally-flush-device-tlb-for-pasi.patch iommu-arm-smmu-v3-do-not-use-devm-for-the-cd-table-a.patch -cgroup-disallow-mounting-v1-hierarchies-without-cont.patch drm-stm-avoid-use-after-free-issues-with-crtc-and-pl.patch drm-amd-display-pass-non-null-to-dcn20_validate_appl.patch drm-amd-display-check-null-pointers-before-using-the.patch diff --git a/queue-6.11/cgroup-disallow-mounting-v1-hierarchies-without-cont.patch b/queue-6.11/cgroup-disallow-mounting-v1-hierarchies-without-cont.patch deleted file mode 100644 index 3b08566d0f5..00000000000 --- a/queue-6.11/cgroup-disallow-mounting-v1-hierarchies-without-cont.patch +++ /dev/null @@ -1,71 +0,0 @@ -From 0ae1b0ba766f12523373938534ae6ee0c4ccc065 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Mon, 9 Sep 2024 18:32:22 +0200 -Subject: cgroup: Disallow mounting v1 hierarchies without controller - implementation -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -From: Michal Koutný - -[ Upstream commit 3c41382e920f1dd5c9f432948fe799c07af1cced ] - -The configs that disable some v1 controllers would still allow mounting -them but with no controller-specific files. (Making such hierarchies -equivalent to named v1 hierarchies.) To achieve behavior consistent with -actual out-compilation of a whole controller, the mounts should treat -respective controllers as non-existent. - -Wrap implementation into a helper function, leverage legacy_files to -detect compiled out controllers. The effect is that mounts on v1 would -fail and produce a message like: - [ 1543.999081] cgroup: Unknown subsys name 'memory' - -Signed-off-by: Michal Koutný -Signed-off-by: Tejun Heo -Signed-off-by: Sasha Levin ---- - kernel/cgroup/cgroup-v1.c | 12 ++++++++++-- - 1 file changed, 10 insertions(+), 2 deletions(-) - -diff --git a/kernel/cgroup/cgroup-v1.c b/kernel/cgroup/cgroup-v1.c -index b9dbf6bf2779d..784337694a4be 100644 ---- a/kernel/cgroup/cgroup-v1.c -+++ b/kernel/cgroup/cgroup-v1.c -@@ -46,6 +46,12 @@ bool cgroup1_ssid_disabled(int ssid) - return cgroup_no_v1_mask & (1 << ssid); - } - -+static bool cgroup1_subsys_absent(struct cgroup_subsys *ss) -+{ -+ /* Check also dfl_cftypes for file-less controllers, i.e. perf_event */ -+ return ss->legacy_cftypes == NULL && ss->dfl_cftypes; -+} -+ - /** - * cgroup_attach_task_all - attach task 'tsk' to all cgroups of task 'from' - * @from: attach to all cgroups of a given task -@@ -932,7 +938,8 @@ int cgroup1_parse_param(struct fs_context *fc, struct fs_parameter *param) - if (ret != -ENOPARAM) - return ret; - for_each_subsys(ss, i) { -- if (strcmp(param->key, ss->legacy_name)) -+ if (strcmp(param->key, ss->legacy_name) || -+ cgroup1_subsys_absent(ss)) - continue; - if (!cgroup_ssid_enabled(i) || cgroup1_ssid_disabled(i)) - return invalfc(fc, "Disabled controller '%s'", -@@ -1024,7 +1031,8 @@ static int check_cgroupfs_options(struct fs_context *fc) - mask = ~((u16)1 << cpuset_cgrp_id); - #endif - for_each_subsys(ss, i) -- if (cgroup_ssid_enabled(i) && !cgroup1_ssid_disabled(i)) -+ if (cgroup_ssid_enabled(i) && !cgroup1_ssid_disabled(i) && -+ !cgroup1_subsys_absent(ss)) - enabled |= 1 << i; - - ctx->subsys_mask &= enabled; --- -2.43.0 - diff --git a/queue-6.11/series b/queue-6.11/series index b03622ac60d..71a408ba528 100644 --- a/queue-6.11/series +++ b/queue-6.11/series @@ -197,7 +197,6 @@ iommu-vt-d-always-reserve-a-domain-id-for-identity-s.patch iommu-vt-d-fix-potential-lockup-if-qi_submit_sync-ca.patch iommu-vt-d-unconditionally-flush-device-tlb-for-pasi.patch iommu-arm-smmu-v3-do-not-use-devm-for-the-cd-table-a.patch -cgroup-disallow-mounting-v1-hierarchies-without-cont.patch drm-stm-avoid-use-after-free-issues-with-crtc-and-pl.patch drm-amd-display-pass-non-null-to-dcn20_validate_appl.patch drm-amd-display-check-null-pointers-before-using-the.patch diff --git a/queue-6.6/cgroup-disallow-mounting-v1-hierarchies-without-cont.patch b/queue-6.6/cgroup-disallow-mounting-v1-hierarchies-without-cont.patch deleted file mode 100644 index 4789860566f..00000000000 --- a/queue-6.6/cgroup-disallow-mounting-v1-hierarchies-without-cont.patch +++ /dev/null @@ -1,71 +0,0 @@ -From 3e3f06157524e8bf35904f76100b5681f47f4da7 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Mon, 9 Sep 2024 18:32:22 +0200 -Subject: cgroup: Disallow mounting v1 hierarchies without controller - implementation -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -From: Michal Koutný - -[ Upstream commit 3c41382e920f1dd5c9f432948fe799c07af1cced ] - -The configs that disable some v1 controllers would still allow mounting -them but with no controller-specific files. (Making such hierarchies -equivalent to named v1 hierarchies.) To achieve behavior consistent with -actual out-compilation of a whole controller, the mounts should treat -respective controllers as non-existent. - -Wrap implementation into a helper function, leverage legacy_files to -detect compiled out controllers. The effect is that mounts on v1 would -fail and produce a message like: - [ 1543.999081] cgroup: Unknown subsys name 'memory' - -Signed-off-by: Michal Koutný -Signed-off-by: Tejun Heo -Signed-off-by: Sasha Levin ---- - kernel/cgroup/cgroup-v1.c | 12 ++++++++++-- - 1 file changed, 10 insertions(+), 2 deletions(-) - -diff --git a/kernel/cgroup/cgroup-v1.c b/kernel/cgroup/cgroup-v1.c -index 9cb00ebe9ac6d..01149e47e1a72 100644 ---- a/kernel/cgroup/cgroup-v1.c -+++ b/kernel/cgroup/cgroup-v1.c -@@ -46,6 +46,12 @@ bool cgroup1_ssid_disabled(int ssid) - return cgroup_no_v1_mask & (1 << ssid); - } - -+static bool cgroup1_subsys_absent(struct cgroup_subsys *ss) -+{ -+ /* Check also dfl_cftypes for file-less controllers, i.e. perf_event */ -+ return ss->legacy_cftypes == NULL && ss->dfl_cftypes; -+} -+ - /** - * cgroup_attach_task_all - attach task 'tsk' to all cgroups of task 'from' - * @from: attach to all cgroups of a given task -@@ -932,7 +938,8 @@ int cgroup1_parse_param(struct fs_context *fc, struct fs_parameter *param) - if (ret != -ENOPARAM) - return ret; - for_each_subsys(ss, i) { -- if (strcmp(param->key, ss->legacy_name)) -+ if (strcmp(param->key, ss->legacy_name) || -+ cgroup1_subsys_absent(ss)) - continue; - if (!cgroup_ssid_enabled(i) || cgroup1_ssid_disabled(i)) - return invalfc(fc, "Disabled controller '%s'", -@@ -1024,7 +1031,8 @@ static int check_cgroupfs_options(struct fs_context *fc) - mask = ~((u16)1 << cpuset_cgrp_id); - #endif - for_each_subsys(ss, i) -- if (cgroup_ssid_enabled(i) && !cgroup1_ssid_disabled(i)) -+ if (cgroup_ssid_enabled(i) && !cgroup1_ssid_disabled(i) && -+ !cgroup1_subsys_absent(ss)) - enabled |= 1 << i; - - ctx->subsys_mask &= enabled; --- -2.43.0 - diff --git a/queue-6.6/series b/queue-6.6/series index d42048d3707..543f3e1579f 100644 --- a/queue-6.6/series +++ b/queue-6.6/series @@ -126,7 +126,6 @@ rcuscale-provide-clear-error-when-async-specified-wi.patch power-reset-brcmstb-do-not-go-into-infinite-loop-if-.patch iommu-vt-d-always-reserve-a-domain-id-for-identity-s.patch iommu-vt-d-fix-potential-lockup-if-qi_submit_sync-ca.patch -cgroup-disallow-mounting-v1-hierarchies-without-cont.patch drm-stm-avoid-use-after-free-issues-with-crtc-and-pl.patch drm-amdgpu-disallow-multiple-bo_handles-chunks-in-on.patch drm-amdkfd-amdkfd_free_gtt_mem-clear-the-correct-poi.patch