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] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 7 Aug 2023 20:59:59 -0700
From:   Roman Gushchin <roman.gushchin@...ux.dev>
To:     xiongwei.song@...driver.com
Cc:     hannes@...xchg.org, mhocko@...nel.org, shakeelb@...gle.com,
        muchun.song@...ux.dev, akpm@...ux-foundation.org,
        cgroups@...r.kernel.org, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm/memcontrol: add tips for kmem.slabinfo

On Tue, Aug 08, 2023 at 10:22:29AM +0800, xiongwei.song@...driver.com wrote:
> From: Xiongwei Song <xiongwei.song@...driver.com>
> 
> No any output from kmem.slabinfo, which is not friendly. Adding
> tips for it.
> 
> Signed-off-by: Xiongwei Song <xiongwei.song@...driver.com>
> ---
>  mm/memcontrol.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/mm/memcontrol.c b/mm/memcontrol.c
> index e8ca4bdcb03c..58d3bd93890b 100644
> --- a/mm/memcontrol.c
> +++ b/mm/memcontrol.c
> @@ -5002,10 +5002,8 @@ static ssize_t memcg_write_event_control(struct kernfs_open_file *of,
>  #if defined(CONFIG_MEMCG_KMEM) && (defined(CONFIG_SLAB) || defined(CONFIG_SLUB_DEBUG))
>  static int mem_cgroup_slab_show(struct seq_file *m, void *p)
>  {
> -	/*
> -	 * Deprecated.
> -	 * Please, take a look at tools/cgroup/memcg_slabinfo.py .
> -	 */
> +	seq_puts(m, "This file is deprecated.\n"
> +		"Please use tools/cgroup/memcg_slabinfo.py, which is in kernel source.\n");

It'll break the ABI.
The only possible option here is to use WARN_ON_ONCE(), which will print once to dmesg.
But honestly I'm not sure we need it.

Thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ