lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ZowzK7T50fGtgFtW@slm.duckdns.org>
Date: Mon, 8 Jul 2024 08:42:51 -1000
From: Tejun Heo <tj@...nel.org>
To: Chen Ridong <chenridong@...wei.com>
Cc: lizefan.x@...edance.com, hannes@...xchg.org, longman@...hat.com,
	cgroups@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH -next] cgroup: distinguish name and legacy_name when show
 /proc/cgroups

Hello,

On Sat, Jul 06, 2024 at 11:38:30AM +0000, Chen Ridong wrote:
> Subsys_name may be different between v1 and v2. In cgroup v2
> blk subsys_name is io, while it is named blkio in cgroup v1.
> It better to distinguish name and legacy_name when we cat /proc/cgroups.
> 
> Signed-off-by: Chen Ridong <chenridong@...wei.com>
> ---
>  kernel/cgroup/cgroup-v1.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/kernel/cgroup/cgroup-v1.c b/kernel/cgroup/cgroup-v1.c
> index b9dbf6bf2779..b29252ad91b6 100644
> --- a/kernel/cgroup/cgroup-v1.c
> +++ b/kernel/cgroup/cgroup-v1.c
> @@ -677,7 +677,8 @@ int proc_cgroupstats_show(struct seq_file *m, void *v)
>  
>  	for_each_subsys(ss, i)
>  		seq_printf(m, "%s\t%d\t%d\t%d\n",
> -			   ss->legacy_name, ss->root->hierarchy_id,
> +			   ss->root == &cgrp_dfl_root ? ss->name : ss->legacy_name,
> +			   ss->root->hierarchy_id,

No matter what we do, this is a user visible change and the file isn't all
that useful for cgroup2 anyway. I'd much rather leave it as-is and let it
wither away.

Thanks.

-- 
tejun

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ