]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
drop cgroup patch
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Oct 2024 09:25:30 +0000 (11:25 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Oct 2024 09:25:30 +0000 (11:25 +0200)
14 files changed:
queue-5.10/cgroup-disallow-mounting-v1-hierarchies-without-cont.patch [deleted file]
queue-5.10/series
queue-5.15/cgroup-disallow-mounting-v1-hierarchies-without-cont.patch [deleted file]
queue-5.15/series
queue-5.4/cgroup-disallow-mounting-v1-hierarchies-without-cont.patch [deleted file]
queue-5.4/series
queue-6.1/cgroup-disallow-mounting-v1-hierarchies-without-cont.patch [deleted file]
queue-6.1/series
queue-6.10/cgroup-disallow-mounting-v1-hierarchies-without-cont.patch [deleted file]
queue-6.10/series
queue-6.11/cgroup-disallow-mounting-v1-hierarchies-without-cont.patch [deleted file]
queue-6.11/series
queue-6.6/cgroup-disallow-mounting-v1-hierarchies-without-cont.patch [deleted file]
queue-6.6/series

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 (file)
index c0ad17e..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-From 9b6c011f44b1cef78313687212c19135f4a2ba25 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-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ý <mkoutny@suse.com>
-
-[ 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ý <mkoutny@suse.com>
-Signed-off-by: Tejun Heo <tj@kernel.org>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- 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
-
index 9bfeb97e683262ac0801777ecacb949fa2e61432..49f3487ee6bc0ff020bb6676f6ecf538fbaf0a24 100644 (file)
@@ -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 (file)
index 959962a..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-From 4ae8f436f32ddcd5381588c65ef1da960a7e672f Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-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ý <mkoutny@suse.com>
-
-[ 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ý <mkoutny@suse.com>
-Signed-off-by: Tejun Heo <tj@kernel.org>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- 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
-
index f2edb1aa89698b058794b9f205f16af4cd9f4dd3..c99729724d6930d43bc9dcb8fefb882cc48fec7b 100644 (file)
@@ -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 (file)
index fd878e2..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-From f699419da0a29505961b03d8b99acfee53672d60 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-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ý <mkoutny@suse.com>
-
-[ 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ý <mkoutny@suse.com>
-Signed-off-by: Tejun Heo <tj@kernel.org>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- 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
-
index d8d6ff010d5a20a84ccc58f41defea0cf13d1265..bf9c20cf01b68d64b84b620c58de468eaf88c6b2 100644 (file)
@@ -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 (file)
index 67bd2c4..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-From a235525004b0e70293fb65cbc467b063029d4ebe Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-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ý <mkoutny@suse.com>
-
-[ 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ý <mkoutny@suse.com>
-Signed-off-by: Tejun Heo <tj@kernel.org>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- 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
-
index 770f03e36d4fab07c465579af65ede031897e845..7e1f15a017ce10e8ffd5f2b27806a3bba8699aa2 100644 (file)
@@ -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 (file)
index 90011fb..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-From f9571e8ad38d9421f6495a889213df68eaebc9ae Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-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ý <mkoutny@suse.com>
-
-[ 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ý <mkoutny@suse.com>
-Signed-off-by: Tejun Heo <tj@kernel.org>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- 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
-
index c011b7d31edf20c5e26211a14b835ad06e602b40..80930153fb14a324e567a7aea74295ad6d85d7c3 100644 (file)
@@ -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 (file)
index 3b08566..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-From 0ae1b0ba766f12523373938534ae6ee0c4ccc065 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-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ý <mkoutny@suse.com>
-
-[ 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ý <mkoutny@suse.com>
-Signed-off-by: Tejun Heo <tj@kernel.org>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- 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
-
index b03622ac60d51e506f762757019d542e170a4e61..71a408ba528ac98bb19cffcff39c7f5881d3e787 100644 (file)
@@ -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 (file)
index 4789860..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-From 3e3f06157524e8bf35904f76100b5681f47f4da7 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-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ý <mkoutny@suse.com>
-
-[ 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ý <mkoutny@suse.com>
-Signed-off-by: Tejun Heo <tj@kernel.org>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- 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
-
index d42048d3707f16a9e618e4538411472c769b5ffb..543f3e1579f24657c8c8b76d8e11fb1ac0db70e5 100644 (file)
@@ -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