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-next>] [day] [month] [year] [list]
Message-ID: <aLqh2ojEpZZhjheT@google.com>
Date: Fri, 5 Sep 2025 08:39:54 +0000
From: Sean Christopherson <seanjc@...gle.com>
To: "Faruqui, Aqib" <aqibaf@...zon.co.uk>
Cc: kvm@...r.kernel.org, linux-kselftest@...r.kernel.org, 
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 5/9] KVM: selftests: Prevent PAGE_SIZE redefinition on x86

+lists

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

On Tue, Sep 02, 2025, Faruqui, Aqib wrote:
> I suppose a fix for blindly using PAGE_SIZE in subsequent macros:
> 
> #ifdef PAGE_SIZE
> #undef PAGE_SIZE
> #endif
> #define PAGE_SIZE		(1ULL << PAGE_SHIFT)
> 
> Is no better and is instead blindly suppressing the compiler's redefinition warning. 
> 
> I'm having trouble finding what causes the conflict, any advice here?

Maybe try a newer compiler?  E.g. gcc-14.2 will spit out the exact location of the
previous definition.

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)
      |         ^~~~~~~~~

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ