linux-riscv.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Huacai Chen <chenhuacai@kernel.org>
To: Ard Biesheuvel <ardb@kernel.org>
Cc: Tiezhu Yang <yangtiezhu@loongson.cn>,
	Josh Poimboeuf <jpoimboe@kernel.org>,
	 loongarch@lists.linux.dev, linux-arm-kernel@lists.infradead.org,
	 linux-riscv@lists.infradead.org, linux-efi@vger.kernel.org,
	 linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] efistub: Only link libstub to final vmlinux
Date: Tue, 30 Sep 2025 10:52:59 +0800	[thread overview]
Message-ID: <CAAhV-H6PNcyTNXEhzdovt3an7e9V+B+Z-px=_HPiQ5vv7qaDMg@mail.gmail.com> (raw)
In-Reply-To: <CAMj1kXG=EFkRAMkvKMSjPixoGqU-tZXVoRkJJ6Wcnzs3x52X6Q@mail.gmail.com>

On Sun, Sep 28, 2025 at 10:40 PM Ard Biesheuvel <ardb@kernel.org> wrote:
>
> On Sun, 28 Sept 2025 at 15:52, Huacai Chen <chenhuacai@kernel.org> wrote:
> >
> > Hi, Ard,
> >
> > On Sun, Sep 28, 2025 at 9:42 PM Ard Biesheuvel <ardb@kernel.org> wrote:
> > >
> > > On Sun, 28 Sept 2025 at 10:55, Tiezhu Yang <yangtiezhu@loongson.cn> wrote:
> > > >
> > > > When compiling with LLVM and CONFIG_LTO_CLANG is set, there exists
> > > > the following objtool warning on LoongArch:
> > > >
> > > >   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.
> > > >
> > > > Since the efistub functions are useless for stack unwinder, they can be
> > > > ignored by objtool. After many discussions, no need to link libstub to
> > > > the vmlinux.o, only link libstub to the final vmlinux.
> > > >
> > >
> > > Please try keeping these changes confined to arch/loongarch. This
> > > problem does not exist on other architectures, and changing the way
> > > vmlinux is constructed might create other issues down the road.
> > ARM, RISC-V and LoongArch do things exactly in the same way. Now
> > LoongArch is the first of the three to enable objtool, so we meet the
> > problem first.
> >
> > But yes, I also don't want to change the way of constructing vmlinux.
> > So I prefer the earliest way to fix this problem.
> > https://lore.kernel.org/loongarch/CAAhV-H7fRHGFVKV8HitRgmuoDPt5ODt--iSuV0EmeeUb9d5FNw@mail.gmail.com/T/#meef7411abd14f4c28c85e686614aa9211fccdca0
> >
>
> Can we just drop the __noreturn annotation from kernel_entry_t, and
> return EFI_SUCCESS from efi_boot_kernel()?
Not good, because kernel_entry_t is really "noreturn", and at present
no architecture returns EFI_SUCCESS at the end of efi_boot_kernel().


Huacai

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

      parent reply	other threads:[~2025-09-30  2:53 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-28  8:55 [PATCH v2] efistub: Only link libstub to final vmlinux Tiezhu Yang
2025-09-28 13:41 ` Ard Biesheuvel
2025-09-28 13:52   ` Huacai Chen
2025-09-28 14:39     ` Ard Biesheuvel
2025-09-28 14:41       ` Ard Biesheuvel
2025-10-09  7:27         ` Tiezhu Yang
2025-10-10 16:25           ` Ard Biesheuvel
2025-10-11  1:13             ` Tiezhu Yang
2025-10-11  2:54               ` Huacai Chen
2025-10-11  3:40                 ` Ard Biesheuvel
2025-10-11  7:29                   ` Tiezhu Yang
2025-10-11  7:42                     ` Huacai Chen
2025-10-11  8:13                       ` Tiezhu Yang
2025-10-11 14:48                       ` Ard Biesheuvel
2025-10-11 15:01                         ` Huacai Chen
2025-10-11 15:58                           ` Ard Biesheuvel
2025-10-13  7:34                             ` Tiezhu Yang
2025-10-13 14:09                             ` Huacai Chen
2025-10-13 14:36                               ` Ard Biesheuvel
2025-10-14 16:47                                 ` Josh Poimboeuf
2025-10-16 14:52                                   ` Ard Biesheuvel
2025-10-16 15:49                                     ` Josh Poimboeuf
2025-10-17 11:00                                       ` Ard Biesheuvel
2025-10-17 16:22                                         ` Josh Poimboeuf
2025-10-17 16:26                                           ` Ard Biesheuvel
2025-10-17 17:05                                             ` Josh Poimboeuf
2025-10-20  1:24                                               ` Tiezhu Yang
2025-10-20  6:55                                                 ` Huacai Chen
2025-10-23  6:55                                                   ` Tiezhu Yang
2025-10-23  8:01                                                     ` Huacai Chen
2025-10-23  8:06                                                       ` Ard Biesheuvel
2025-10-26 11:20                                                         ` Huacai Chen
2025-10-28 13:47                                                           ` Ard Biesheuvel
2025-11-10  1:18                                                             ` Tiezhu Yang
2025-11-10  7:00                                                               ` Huacai Chen
2025-11-11 16:49                                                                 ` Ard Biesheuvel
2025-11-11 18:00                                                                 ` Josh Poimboeuf
2025-11-15  3:16                                                                   ` Huacai Chen
2025-11-17 11:33                                                                     ` Will Deacon
2025-11-21  2:09                                                                       ` Paul Walmsley
2025-11-21 14:36                                                                       ` Huacai Chen
2025-11-22 11:04                                                                         ` Tiezhu Yang
2025-11-23  2:29                                                                           ` Huacai Chen
2025-11-23  3:37                                                                             ` Tiezhu Yang
2025-11-25  1:49                                                                               ` Josh Poimboeuf
2025-11-28 10:11                                                                                 ` Huacai Chen
2025-09-30  2:52       ` Huacai Chen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAAhV-H6PNcyTNXEhzdovt3an7e9V+B+Z-px=_HPiQ5vv7qaDMg@mail.gmail.com' \
    --to=chenhuacai@kernel.org \
    --cc=ardb@kernel.org \
    --cc=jpoimboe@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-efi@vger.kernel.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=loongarch@lists.linux.dev \
    --cc=yangtiezhu@loongson.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).