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  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]
Date:   Sun, 10 Jan 2021 18:28:09 -0700
From:   Nathan Chancellor <natechancellor@...il.com>
To:     Alexander Lobakin <alobakin@...me>
Cc:     Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
        Arnd Bergmann <arnd@...db.de>,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        Huacai Chen <chenhuacai@...nel.org>,
        Pei Huang <huangpei@...ngson.cn>,
        Kees Cook <keescook@...omium.org>,
        Fangrui Song <maskray@...gle.com>,
        Jiaxun Yang <jiaxun.yang@...goat.com>,
        Ralf Baechle <ralf@...ux-mips.org>,
        Corey Minyard <cminyard@...sta.com>,
        linux-mips@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-arch@...r.kernel.org, stable@...r.kernel.org,
        clang-built-linux@...glegroups.com
Subject: Re: [PATCH v5 mips-next 5/9] MIPS: vmlinux.lds.S: explicitly catch
 .rel.dyn symbols

On Sun, Jan 10, 2021 at 11:56:34AM +0000, Alexander Lobakin wrote:
> According to linker warnings, both GCC and LLVM generate '.rel.dyn'
> symbols:
> 
> mips-alpine-linux-musl-ld: warning: orphan section `.rel.dyn'
> from `init/main.o' being placed in section `.rel.dyn'
> 
> Link-time assertion shows that this section is sometimes empty,
> sometimes not, depending on machine bitness and the compiler [0]:
> 
>   LD      .tmp_vmlinux.kallsyms1
> mips64-linux-gnu-ld: Unexpected run-time relocations (.rel) detected!
> 
> Just use the ARM64 approach and declare it in vmlinux.lds.S closer
> to __init_end.
> 
> [0] https://lore.kernel.org/linux-mips/20210109111259.GA4213@alpha.franken.de
> 
> Reported-by: Thomas Bogendoerfer <tsbogend@...ha.franken.de>
> Signed-off-by: Alexander Lobakin <alobakin@...me>

Reviewed-by: Nathan Chancellor <natechancellor@...il.com>

> ---
>  arch/mips/kernel/vmlinux.lds.S | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/arch/mips/kernel/vmlinux.lds.S b/arch/mips/kernel/vmlinux.lds.S
> index 10d8f0dcb76b..70bba1ff08da 100644
> --- a/arch/mips/kernel/vmlinux.lds.S
> +++ b/arch/mips/kernel/vmlinux.lds.S
> @@ -137,6 +137,11 @@ SECTIONS
>  	PERCPU_SECTION(1 << CONFIG_MIPS_L1_CACHE_SHIFT)
>  #endif
>  
> +	.rel.dyn : ALIGN(8) {
> +		*(.rel)
> +		*(.rel*)
> +	}
> +
>  #ifdef CONFIG_MIPS_ELF_APPENDED_DTB
>  	.appended_dtb : AT(ADDR(.appended_dtb) - LOAD_OFFSET) {
>  		*(.appended_dtb)
> -- 
> 2.30.0
> 
> 

Powered by blists - more mailing lists