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] [day] [month] [year] [list]
Message-ID: <8f1a50bf-3c18-c550-1c69-525d30cb8f26@loongson.cn>
Date: Thu, 28 Aug 2025 10:01:54 +0800
From: Tiezhu Yang <yangtiezhu@...ngson.cn>
To: Josh Poimboeuf <jpoimboe@...nel.org>
Cc: Huacai Chen <chenhuacai@...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 2/2] objtool/LoongArch: Fix unreachable instruction
 warnings about head.S

On 2025/8/27 上午7:43, Josh Poimboeuf wrote:
> On Tue, Aug 26, 2025 at 08:30:23PM +0800, Tiezhu Yang wrote:
>> On 2025/8/26 下午4:26, 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 exist the
>>>> following objtool warnings after silencing all of the other warnings:
>>
>> ...
>>
>>>>    arch/loongarch/kernel/head.S | 8 ++++----
>>>>    1 file changed, 4 insertions(+), 4 deletions(-)
>>>>
>>>> diff --git a/arch/loongarch/kernel/head.S b/arch/loongarch/kernel/head.S
>>>> index e3865e92a917..566a1dbf5fa0 100644
>>>> --- a/arch/loongarch/kernel/head.S
>>>> +++ b/arch/loongarch/kernel/head.S
>>>> @@ -20,6 +20,7 @@
>>>>           __HEAD
>>>>
>>>>    _head:
>>>> +       UNWIND_HINT_UNDEFINED
>>>>           .word   IMAGE_DOS_SIGNATURE     /* "MZ", MS-DOS header */
>>>>           .org    0x8
>>>>           .dword  _kernel_entry           /* Kernel entry point (physical address) */
>>>> @@ -30,6 +31,7 @@ _head:
>>>>           .long   pe_header - _head       /* Offset to the PE header */
>>>>
>>>>    pe_header:
>>>> +       UNWIND_HINT_UNDEFINED
>>>>           __EFI_PE_HEADER
>>> The efi header is completely not code, the annotations are very strange.
>>
>> Yes, I think so too, but the aim is only to not checking for objtool,
>> it seems no other better way.
> 
> Objtool is only getting confused because there's data in a text section.
> Why not put that in a data section?

Thank you very much, that is to say, these EFISTUB instructions can be
ignored by objtool, I will do it.

Thanks,
Tiezhu


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ