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: <487a8149-6cbe-46a7-6771-66aef0045f07@loongson.cn>
Date: Tue, 26 Aug 2025 20:33:20 +0800
From: Tiezhu Yang <yangtiezhu@...ngson.cn>
To: Huacai Chen <chenhuacai@...nel.org>
Cc: Josh Poimboeuf <jpoimboe@...nel.org>,
 Peter Zijlstra <peterz@...radead.org>, Nathan Chancellor
 <nathan@...nel.org>, loongarch@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH 1/2] objtool/LoongArch: Fix fall through warning about
 efi_boot_kernel()

On 2025/8/26 下午4:32, Huacai Chen wrote:
> On Tue, Aug 26, 2025 at 2:46 PM Tiezhu Yang <yangtiezhu@...ngson.cn> 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()

...

>> -typedef void __noreturn (*kernel_entry_t)(bool efi, unsigned long cmdline,
>> +typedef void (*kernel_entry_t)(bool efi, unsigned long cmdline,
>>                                            unsigned long systab);
>  From my point of view this is incorrect, this function is indeed a
> noreturn function, and this modification makes LoongArch different to
> other architectures.
> 
> Maybe it is better to let objtool ignore the whole
> drivers/firmware/efi/libstub directory. Because efistub is discarded
> at runtime so it is useless for stack unwinder.

I tested the following change but there is no effect, the objtool
warning still exists, this is because OBJECT_FILES_NON_STANDARD
does not work for link time validation of vmlinux.o according to
tools/objtool/Documentation/objtool.txt.

diff --git a/drivers/firmware/efi/Makefile b/drivers/firmware/efi/Makefile
index 8efbcf699e4f..f1fff48eea76 100644
--- a/drivers/firmware/efi/Makefile
+++ b/drivers/firmware/efi/Makefile
@@ -10,6 +10,8 @@
  #
  KASAN_SANITIZE_runtime-wrappers.o      := n

+OBJECT_FILES_NON_STANDARD              := y
+
  obj-$(CONFIG_ACPI_BGRT)                += efi-bgrt.o
  obj-$(CONFIG_EFI)                      += efi.o vars.o reboot.o 
memattr.o tpm.o
  obj-$(CONFIG_EFI)                      += memmap.o

Thanks,
Tiezhu


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ