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: <aMmA4Fnvpd9Szyq2@milan>
Date: Tue, 16 Sep 2025 17:23:12 +0200
From: Uladzislau Rezki <urezki@...il.com>
To: Michal Hocko <mhocko@...e.com>
Cc: "Uladzislau Rezki (Sony)" <urezki@...il.com>, linux-mm@...ck.org,
	Andrew Morton <akpm@...ux-foundation.org>,
	Baoquan He <bhe@...hat.com>, LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 09/10] mm: Skip might_alloc() warnings when
 PF_MEMALLOC is set

On Mon, Sep 15, 2025 at 07:16:50PM +0200, Michal Hocko wrote:
> On Mon 15-09-25 15:40:39, Uladzislau Rezki wrote:
> > might_alloc() catches invalid blocking allocations in contexts
> > where sleeping is not allowed.
> > 
> > However when PF_MEMALLOC is set, the page allocator already skips
> > reclaim and other blocking paths. In such cases, a blocking gfp_mask
> > does not actually lead to blocking, so triggering might_alloc() splats
> > is misleading.
> > 
> > Adjust might_alloc() to skip warnings when the current task has
> > PF_MEMALLOC set, matching the allocator's actual blocking behaviour.
> > 
> > Signed-off-by: Uladzislau Rezki (Sony) <urezki@...il.com>
> 
> I would probably just bail out early for PF_MEMALLOC to not meddle with
> might_sleep_if condition as it seems to read better but I do not insist.
> Acked-by: Michal Hocko <mhocko@...e.com>
>
Thank you, i will apply it and place the check into separate "if"
condition.

--
Uladzislau Rezki

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ