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: <07dcb646-d806-4767-b29d-77092f6819e4@roeck-us.net>
Date: Mon, 2 Dec 2024 12:33:10 -0800
From: Guenter Roeck <linux@...ck-us.net>
To: Masahiro Yamada <masahiroy@...nel.org>
Cc: Jonas Bonn <jonas@...thpole.se>,
	Stefan Kristiansson <stefan.kristiansson@...nalahti.fi>,
	Stafford Horne <shorne@...il.com>, linux-openrisc@...r.kernel.org,
	linux-kbuild@...r.kernel.org, Rong Xu <xur@...gle.com>,
	Han Shen <shenhan@...gle.com>, Kees Cook <kees@...nel.org>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] openrisc: place exception table at the head of vmlinux

On Mon, Dec 02, 2024 at 03:28:22PM +0900, Masahiro Yamada wrote:
> Since commit 0043ecea2399 ("vmlinux.lds.h: Adjust symbol ordering in
> text output section"), the exception table in arch/openrisc/kernel/head.S
> is no longer positioned at the very beginning of the kernel image, which
> causes a boot failure.
> 
> Currently, the exception table resides in the regular .text section.
> Previously, it was placed at the head by relying on the linker receiving
> arch/openrisc/kernel/head.o as the first object. However, this behavior
> has changed because sections like .text.{asan,unknown,unlikely,hot} now
> precede the regular .text section.
> 
> The .head.text section is intended for entry points requiring special
> placement. However, in OpenRISC, this section has been misused: instead
> of the entry points, it contains boot code meant to be discarded after
> booting. This feature is typically handled by the .init.text section.
> 
> This commit addresses the issue by replacing the current __HEAD marker
> with __INIT and re-annotating the entry points with __HEAD. Additionally,
> it adds __REF to entry.S to suppress the following modpost warning:
> 
>   WARNING: modpost: vmlinux: section mismatch in reference: _tng_kernel_start+0x70 (section: .text) -> _start (section: .init.text)
> 
> Fixes: 0043ecea2399 ("vmlinux.lds.h: Adjust symbol ordering in text output section")
> Reported-by: Guenter Roeck <linux@...ck-us.net>
> Closes: https://lore.kernel.org/all/5e032233-5b65-4ad5-ac50-d2eb6c00171c@roeck-us.net/#t
> Signed-off-by: Masahiro Yamada <masahiroy@...nel.org>

Tested-by: Guenter Roeck <linux@...ck-us.net>

Guenter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ