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: <ym3yf3rkxfq3sukfqbemmbpamjfsx4jjushqh3f54ah5ugamse@qqwabon64umq>
Date: Wed, 17 Sep 2025 15:32:24 -0700
From: Josh Poimboeuf <jpoimboe@...nel.org>
To: Tiezhu Yang <yangtiezhu@...ngson.cn>
Cc: Peter Zijlstra <peterz@...radead.org>, 
	Huacai Chen <chenhuacai@...nel.org>, loongarch@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 1/3] objtool/LoongArch: Fix fall through warning about
 efistub

On Wed, Sep 17, 2025 at 07:27:14PM +0800, Tiezhu Yang wrote:
> When compiling with LLVM and CONFIG_LTO_CLANG is set, there exists
> the following objtool warning:
> 
>   vmlinux.o: warning: objtool: __efistub_efi_boot_kernel()
>   falls through to next function __efistub_exit_boot_func()
> 
> This is because efi_boot_kernel() doesn't end with a return instruction
> or an unconditional jump, then objtool has determined that the function
> can fall through into the next function.
> 
> At the beginning, try to do something to make efi_boot_kernel() ends with
> an unconditional jump instruction, but this modification seems not proper
> and makes LoongArch different to other architectures.
> 
> Furthermore, it is not proper to link efistub separately for LoongArch,
> ARM64 and RISC-V too due to there is technical reason why vmlinux.o needs
> efistub linked in.
> 
> For example, there are two ways of populating the core kernel's struct
> screen_info via the stub, the latter is preferred because it makes the
> EFIFB earlycon available very early, but it only works if the EFI stub
> is part of the core kernel image itself. For more information, please
> see the comments in drivers/firmware/efi/libstub/screen_info.c.

Hm?  Of course libstub needs to be linked into *vmlinux*.  But that
doesn't mean it needs to be in vmlinux.o.

Why not build libstub.a separately, and then link it with vmlinux.o
during the final vmlinux link, as x86 does?

-- 
Josh

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ