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: <aIoU3hO9JBAyuTcy@casper.infradead.org>
Date: Wed, 30 Jul 2025 13:49:34 +0100
From: Matthew Wilcox <willy@...radead.org>
To: Zhang Qilong <zhangqilong3@...wei.com>
Cc: arnd@...db.de, gregkh@...uxfoundation.org, linux-kernel@...r.kernel.org,
	linux-mm@...ck.org, lorenzo.stoakes@...cle.com, 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 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]


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ