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: <Z7y2W8tsAOPhqNfn@smile.fi.intel.com>
Date: Mon, 24 Feb 2025 20:11:39 +0200
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Dave Hansen <dave.hansen@...el.com>
Cc: linux-kernel@...r.kernel.org, Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
	Dave Hansen <dave.hansen@...ux.intel.com>, x86@...nel.org,
	"H. Peter Anvin" <hpa@...or.com>, kernel test robot <lkp@...el.com>
Subject: Re: [PATCH v1 1/1] x86/mm: Check if PTRS_PER_PMD is defined before
 use

On Mon, Feb 24, 2025 at 09:59:23AM -0800, Dave Hansen wrote:
> On 2/24/25 09:39, Andy Shevchenko wrote:
> > Compiler is not happy about PTRS_PER_PMD being undefined
> > 
> > In file included from arch/x86/kernel/head_32.S:29:
> > arch/x86/include/asm/pgtable_32.h:59:5: error: "PTRS_PER_PMD" is not defined, evaluates to 0 [-Werror=undef]
> >    59 | #if PTRS_PER_PMD > 1
> > 
> > Add a check to make sure PTRS_PER_PMD is defined before use.
> 
> Hi Andy,
> 
> From reading the "Closes:" link, it appears this is a new issue that
> originates from a new compile flag. So it doesn't seem like it's worth
> backporting.

FWIW, I haven't put any Fixes tag nor Cc: stable@ :-)
Also note this looks like both compilers complain about the same.

> Also, the _behavior_ of "#if PTRS_PER_PMD > 1" was fine, right? It
> didn't cause the logic to go backwards from what was intended, does it?
> 
> This:
> 
> 	https://gcc.gnu.org/onlinedocs/gcc-3.0.2/cpp_4.html
> 
> says: "Identifiers that are not macros, which are all considered to be
> the number zero."
> 
> Which would yield the correct behavior.
> 
> So I think this is purely a fix for new warning in new kernels. We
> shouldn't need to backport this anywhere at all.

-- 
With Best Regards,
Andy Shevchenko



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ