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]
Message-ID: <20250717235604.2atyx2aobwowpge3@offworld>
Date: Thu, 17 Jul 2025 16:56:04 -0700
From: Davidlohr Bueso <dave@...olabs.net>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: Shakeel Butt <shakeel.butt@...ux.dev>, mhocko@...nel.org,
	hannes@...xchg.org, roman.gushchin@...ux.dev, yosryahmed@...gle.com,
	linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/4] mm/memcg: make memory.reclaim interface generic

On Thu, 17 Jul 2025, Andrew Morton wrote:

>On Thu, 17 Jul 2025 15:17:09 -0700 Shakeel Butt <shakeel.butt@...ux.dev> wrote:
>
>> On Mon, Jun 23, 2025 at 11:58:49AM -0700, Davidlohr Bueso wrote:
>> > +
>> > +int user_proactive_reclaim(char *buf, struct mem_cgroup *memcg, pg_data_t *pgdat)
>> > +{
>> > +	unsigned int nr_retries = MAX_RECLAIM_RETRIES;
>> > +	unsigned long nr_to_reclaim, nr_reclaimed = 0;
>> > +	int swappiness = -1;
>> > +	char *old_buf, *start;
>> > +	substring_t args[MAX_OPT_ARGS];
>> > +
>> > +	if (!buf || (!memcg && !pgdat))
>>
>> I don't think this series is adding a use-case where both memcg and
>> pgdat are non-NULL, so let's error out on that as well.
>
>As a followup, please.  This has been in -next for four weeks and I'd
>prefer not to have to route around it (again).
>

From: Davidlohr Bueso <dave@...olabs.net>
Date: Thu, 17 Jul 2025 16:53:24 -0700
Subject: [PATCH] mm-introduce-per-node-proactive-reclaim-interface-fix

Both memcg and node is also a bogus case, per Shakeel.

Signed-off-by: Davidlohr Bueso <dave@...olabs.net>
---
  mm/vmscan.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/vmscan.c b/mm/vmscan.c
index 4598d18ba256..d5f7b1703234 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -7758,7 +7758,7 @@ int user_proactive_reclaim(char *buf,
  	substring_t args[MAX_OPT_ARGS];
  	gfp_t gfp_mask = GFP_KERNEL;
  
-	if (!buf || (!memcg && !pgdat))
+	if (!buf || (!memcg && !pgdat) || (memcg && pgdat))
  		return -EINVAL;
  
  	buf = strstrip(buf);
-- 
2.39.5


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ