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: <ZMzzkyc0M9y29yWw@arm.com>
Date:   Fri, 4 Aug 2023 13:48:19 +0100
From:   Catalin Marinas <catalin.marinas@....com>
To:     Zhang Jianhua <chris.zjh@...wei.com>
Cc:     will@...nel.org, ardb@...nel.org, mark.rutland@....com,
        ryan.roberts@....com, anshuman.khandual@....com,
        joey.gouly@....com, thunder.leizhen@...wei.com, bhe@...hat.com,
        kristina.martsenko@....com, yajun.deng@...ux.dev,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH -next v4] arm64: fix build warning for
 ARM64_MEMSTART_SHIFT

On Fri, Aug 04, 2023 at 03:56:15PM +0800, Zhang Jianhua wrote:
> When building with W=1, the following warning occurs.
> 
> arch/arm64/include/asm/kernel-pgtable.h:129:41: error: "PUD_SHIFT" is not defined, evaluates to 0 [-Werror=undef]
>   129 | #define ARM64_MEMSTART_SHIFT            PUD_SHIFT
>       |                                         ^~~~~~~~~
> arch/arm64/include/asm/kernel-pgtable.h:142:5: note: in expansion of macro ‘ARM64_MEMSTART_SHIFT’
>   142 | #if ARM64_MEMSTART_SHIFT < SECTION_SIZE_BITS
>       |     ^~~~~~~~~~~~~~~~~~~~
> 
> The generic PUD_SHIFT was defined in include/asm-generic/pgtable-nopud.h,
> however the #ifndef __ASSEMBLY__ guard in this header file makes it unavailable
> for assembly files. While someone .S file include the <asm/kernel-pgtable.h>,
> the build warning would occur. Now move the macro ARM64_MEMSTART_SHIFT and
> ARM64_MEMSTART_ALIGN to arch/arm64/mm/init.c where it is used only, to avoid
> this issue.
> 
> Signed-off-by: Zhang Jianhua <chris.zjh@...wei.com>

Reviewed-by: Catalin Marinas <catalin.marinas@....com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ