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] [day] [month] [year] [list]
Message-ID: <20250905135957.12341-1-aqibaf@amazon.com>
Date: Fri, 5 Sep 2025 13:59:57 +0000
From: Aqib Faruqui <aqibaf@...zon.com>
To: <seanjc@...gle.com>
CC: <aqibaf@...zon.co.uk>, <kvm@...r.kernel.org>,
	<linux-kernel@...r.kernel.org>, <linux-kselftest@...r.kernel.org>
Subject: Re: [PATCH 5/9] KVM: selftests: Prevent PAGE_SIZE redefinition on x86

Thanks for the suggestion. I don't see your previous redefinition of PAGE_SIZE 
upstream, just 3 lines above the warning redefinition:

> In file included from include/x86/svm_util.h:13,
>                  from include/x86/sev.h:15,
>                  from lib/x86/sev.c:5:
> include/x86/processor.h:373:9: error: "PAGE_SIZE" redefined [-Werror]
>   373 | #define PAGE_SIZE               (1ULL << PAGE_SHIFT)
>       |         ^~~~~~~~~
> include/x86/processor.h:370:9: note: this is the location of the previous definition
>   370 | #define PAGE_SIZE               BIT(12)
>       |         ^~~~~~~~~

But I investigated further and found that both glibc and musl define PAGE_SIZE in 
sys/user.h:

glibc (sys/user.h):
  #define PAGE_SHIFT    12
  #define PAGE_SIZE     (1UL << PAGE_SHIFT)

musl (sys/user.h):
  #define PAGE_SIZE     4096

KVM selftests (include/x86/processor.h):
  #define PAGE_SHIFT		12
  #define PAGE_SIZE     (1ULL << PAGE_SHIFT)

This creates redefinition warnings with both C libraries on my system. I've already 
sent a v2 patch series with the PAGE_SIZE patch dropped but I'm not sure what the 
next course of action would be for this?

> Please keep discussions on-list unless there's something that can't/shouldn't be
> posted publicly, e.g. for confidentiality or security reasons.

Apologies, doing this for the first time! Hopefully this one works as it should.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ