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: <CAKv+Gu8JcWg4BkxZFPqTotkfHFtP744XYdSx6XROJSM_8pmt2w@mail.gmail.com>
Date:	Tue, 16 Feb 2016 17:12:52 +0100
From:	Ard Biesheuvel <ard.biesheuvel@...aro.org>
To:	Arnd Bergmann <arnd@...db.de>
Cc:	Russell King <linux@....linux.org.uk>,
	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>,
	Kees Cook <keescook@...omium.org>,
	Laura Abbott <labbott@...oraproject.org>,
	Chris Brandt <chris.brandt@...esas.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/2] ARM: mm: hide __start_rodata_section_aligned for
 non-debug builds

On 16 February 2016 at 17:03, Arnd Bergmann <arnd@...db.de> wrote:
> The __start_rodata_section_aligned is only referenced by the
> DEBUG_RODATA code, which is only used when the MMU is enabled,
> but the definition fails on !MMU builds:
>
> arch/arm/kernel/vmlinux.lds:702: undefined symbol `SECTION_SHIFT' referenced in expression
>
> This hides the symbol whenever DEBUG_RODATA is disabled.
>
> Signed-off-by: Arnd Bergmann <arnd@...db.de>
> Fixes: 64ac2e74f0b2 ("ARM: 8502/1: mm: mark section-aligned portion of rodata NX")
> ---
>  arch/arm/kernel/vmlinux.lds.S | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/arch/arm/kernel/vmlinux.lds.S b/arch/arm/kernel/vmlinux.lds.S
> index 2d7085ae1c2f..bb12933aee22 100644
> --- a/arch/arm/kernel/vmlinux.lds.S
> +++ b/arch/arm/kernel/vmlinux.lds.S
> @@ -322,12 +322,14 @@ SECTIONS
>         STABS_DEBUG
>  }
>
> +#ifdef CONFIG_DEBUG_RODATA
>  /*
>   * Without CONFIG_DEBUG_ALIGN_RODATA, __start_rodata_section_aligned will
>   * be the first section-aligned location after __start_rodata. Otherwise,
>   * it will be equal to __start_rodata.
>   */
>  __start_rodata_section_aligned = ALIGN(__start_rodata, 1 << SECTION_SHIFT);
> +#endif
>

Does

PROVIDE(__start_rodata_section_aligned = xxx);

do the trick as well? If it does, it's a bit cleaner.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ