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: Tue, 13 Feb 2024 10:42:27 +0100
From: Michal Hocko <mhocko@...e.com>
To: Johannes Weiner <hannes@...xchg.org>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
	Shakeel Butt <shakeelb@...gle.com>,
	Roman Gushchin <roman.gushchin@...ux.dev>, linux-mm@...ck.org,
	cgroups@...r.kernel.org, linux-kernel@...r.kernel.org,
	Jonas Schäfer <jonas@...licki.name>,
	Narcis Garcia <debianlists@...iu.net>,
	Yosry Ahmed <yosryahmed@...gle.com>
Subject: Re: [PATCH] mm: memcontrol: clarify swapaccount=0 deprecation warning

On Tue 13-02-24 03:16:34, Johannes Weiner wrote:
> The swapaccount deprecation warning is throwing false positives. Since
> we deprecated the knob and defaulted to enabling, the only reports
> we've been getting are from folks that set swapaccount=1. While this
> is a nice affirmation that always-enabling was the right choice, we
> certainly don't want to warn when users request the supported mode.
> 
> Only warn when disabling is requested, and clarify the warning.
> 
> Fixes: b25806dcd3d5 ("mm: memcontrol: deprecate swapaccounting=0 mode")
> Cc: stable@...r.kernel.org
> Reported-by: "Jonas Schäfer" <jonas@...licki.name>
> Reported-by: Narcis Garcia <debianlists@...iu.net>
> Suggested-by: Yosry Ahmed <yosryahmed@...gle.com>
> Signed-off-by: Johannes Weiner <hannes@...xchg.org>

Acked-by: Michal Hocko <mhocko@...e.com>

Thanks!

> ---
>  mm/memcontrol.c | 10 +++++++---
>  1 file changed, 7 insertions(+), 3 deletions(-)
> 
> diff --git a/mm/memcontrol.c b/mm/memcontrol.c
> index 1ed40f9d3a27..107ec5d36819 100644
> --- a/mm/memcontrol.c
> +++ b/mm/memcontrol.c
> @@ -7971,9 +7971,13 @@ bool mem_cgroup_swap_full(struct folio *folio)
>  
>  static int __init setup_swap_account(char *s)
>  {
> -	pr_warn_once("The swapaccount= commandline option is deprecated. "
> -		     "Please report your usecase to linux-mm@...ck.org if you "
> -		     "depend on this functionality.\n");
> +	bool res;
> +
> +	if (!kstrtobool(s, &res) && !res)
> +		pr_warn_once("The swapaccount=0 commdandline option is deprecated "
> +			     "in favor of configuring swap control via cgroupfs. "
> +			     "Please report your usecase to linux-mm@...ck.org if you "
> +			     "depend on this functionality.\n");
>  	return 1;
>  }
>  __setup("swapaccount=", setup_swap_account);
> -- 
> 2.43.0

-- 
Michal Hocko
SUSE Labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ