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: <01f6f594-8fc0-44b3-8bbe-7dc35cfb7299@lucifer.local>
Date: Wed, 30 Jul 2025 13:59:40 +0100
From: Lorenzo Stoakes <lorenzo.stoakes@...cle.com>
To: Matthew Wilcox <willy@...radead.org>
Cc: Zhang Qilong <zhangqilong3@...wei.com>, arnd@...db.de,
        gregkh@...uxfoundation.org, linux-kernel@...r.kernel.org,
        linux-mm@...ck.org, david@...hat.com, wangkefeng.wang@...wei.com,
        sunnanyong@...wei.com
Subject: Re: [PATCH resend v2] /dev/zero: try to align PMD_SIZE for private
 mapping

On Wed, Jul 30, 2025 at 01:49:34PM +0100, Matthew Wilcox wrote:
> On Wed, Jul 30, 2025 at 05:19:05PM +0800, Zhang Qilong wrote:
> > +	if (IS_ENABLED(CONFIG_TRANSPARENT_HUGEPAGE))
> > +		return thp_get_unmapped_area(file, addr, len, pgoff, flags);
> > +
> >  	return mm_get_unmapped_area(current->mm, file, addr, len, pgoff, flags);
>
> I'm sure the build bots will give us a compiler error.
> If CONFIG_TRANSPARENT_HUGEPAGE is not enabled, we get:
> include/linux/huge_mm.h:#define thp_get_unmapped_area   NULL
>
> and we chose that so that various filesystems can unconditionally set
> their .get_unmapped_area method to it.
>
> Which means the cpp will turn this into:
>
> 	if (0)
> 		return NULL(file, addr, len, pgoff, flags);
>
> and the compiler will say:
>
> error: implicit declaration of function ‘NULL’ [-Wimplicit-function-declaration]
>

Yeah I did ask explicitly for #ifdef here :)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ