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: <aTcLqNyqm_WIyn99@milan>
Date: Mon, 8 Dec 2025 18:32:24 +0100
From: Uladzislau Rezki <urezki@...il.com>
To: Brendan Jackman <jackmanb@...gle.com>
Cc: Anshuman Khandual <anshuman.khandual@....com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Uladzislau Rezki <urezki@...il.com>, linux-mm@...ck.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm/vmalloc: clarify why vmap_range_noflush() might sleep

On Mon, Dec 08, 2025 at 07:39:39AM +0000, Brendan Jackman wrote:
> Hi Anshuman, thanks a lot for taking a look.
> 
> On Mon Dec 8, 2025 at 6:41 AM UTC, Anshuman Khandual wrote:
> > Please add <asm-generic/pgalloc.h> in mm/vmalloc.c - otherwise it does not
> > get built as GFP_PGTABLE_KERNEL is not available. But otherwise LGTM.
> 
> Oh, but that's not correct, IIUC we shouldn't directly be including
> asm-generic headers from here.
> 
> So while in principle GFP_PGTABLE_KERNEL is a sensible common
> demoninator here, it doesn't actually exist at all everywhere, e.g. it
> doesn't look like m68k defines it for Motorola. 
> 
> So maybe the best way here is a really vague:
> 
> /* 
>  * Different archs allocate pagetables in different ways, assume
>  * GFP_KERNEL as a common denominator.
>  */
> might_alloc(GFP_KERNEL)
> 
> ... a bit yucky but I think still useful.
> 
> Any thoughts?
>
Maybe just add a comment why that might_sleep() is there?

We can simply state that page table allocation path is hard-coded
internally to use GFP_KERNEL flag.

Thanks!

--
Uladzislau Rezki

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ