mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tiezhu Yang <yangtiezhu@loongson.cn>
To: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
Cc: Huacai Chen <chenhuacai@kernel.org>,
	Miguel Ojeda <ojeda@kernel.org>, WANG Rui <wangrui@loongson.cn>,
	rust-for-linux@vger.kernel.org, loongarch@lists.linux.dev,
	linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH 3/3] LoongArch: Handle table jump option for RUST
Date: Thu, 4 Sep 2025 11:57:53 +0800	[thread overview]
Message-ID: <e9e9b127-3237-92d1-891c-84fc5e6bfcdd@loongson.cn> (raw)
In-Reply-To: <CANiq72n5hg-ZyGV4oEca9iCbmQByanFUpNTkS=QmE1k8MUBR8w@mail.gmail.com>

On 2025/9/3 下午6:28, Miguel Ojeda wrote:
> On Wed, Sep 3, 2025 at 11:53 AM Tiezhu Yang <yangtiezhu@loongson.cn> wrote:
>>
>> When compiling with LLVM and CONFIG_RUST is set, there exist objtool
>> warnings "sibling call from callable instruction with modified stack
>> frame" in rust/core.o and rust/kernel.o.
> 
> Thanks for fixing this! I have seen it for a long time in my CI:
> 
> I think this is:
> 
>      Reported-by: Miguel Ojeda <ojeda@kernel.org>
>      Closes: https://lore.kernel.org/rust-for-linux/CANiq72mNeCuPkCDrG2db3w=AX+O-zYrfprisDPmRac_qh65Dmg@mail.gmail.com/
> 
> Perhaps consider adding an example of the warning in the log for
> future Lore searches:
> 
>      rust/core.o: warning: objtool:
> _RNvXs1_NtNtCs5QSdWC790r4_4core5ascii10ascii_charNtB5_9AsciiCharNtNtB9_3fmt5Debug3fmt+0x54:
> sibling call from callable instruction with modified stack frame

OK, will update the commit message in the next version.

>> (1) Please install rustc 1.78.0 (without annotate-tablejump option) or
>> 1.87.0 (with annotate-tablejump option), do not use the latest version
>> for now, otherwise there may be build error:
> 
> Nightly is not a released version, and it is expected that it breaks
> from time to time. Even beta may break. We are ~2 months away from
> that release.
> 
> In any case, I don't think this information is related to this commit.

OK, I will remove the above info in the commit message.

>> +config RUSTC_HAS_ANNOTATE_TABLEJUMP
>> +       depends on RUST
>> +       def_bool $(rustc-option,-Cllvm-args=--loongarch-annotate-tablejump)
> 
> I think this may be fine given it is `-Cllvm-args` and anyway
> LoongArch doesn't use a `target.json` (which is great!), but please
> double-check reading what I wrote in 46e24a545cdb ("rust:
> kasan/kbuild: fix missing flags on first build") just in case.

OK, will do.

Thanks,
Tiezhu


      reply	other threads:[~2025-09-04  3:57 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-03  9:53 [RFC PATCH 0/3] Fix objtool warnings with RUST on LoongArch Tiezhu Yang
2025-09-03  9:53 ` [RFC PATCH 1/3] docs: rust: quick-start: Add another way to install Tiezhu Yang
2025-09-03 10:11   ` Miguel Ojeda
2025-09-04  3:55     ` Tiezhu Yang
2025-09-03  9:53 ` [RFC PATCH 2/3] LoongArch: Make LTO case independent in Makefile Tiezhu Yang
2025-09-03  9:53 ` [RFC PATCH 3/3] LoongArch: Handle table jump option for RUST Tiezhu Yang
2025-09-03 10:28   ` Miguel Ojeda
2025-09-04  3:57     ` Tiezhu Yang [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=e9e9b127-3237-92d1-891c-84fc5e6bfcdd@loongson.cn \
    --to=yangtiezhu@loongson.cn \
    --cc=chenhuacai@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=loongarch@lists.linux.dev \
    --cc=miguel.ojeda.sandonis@gmail.com \
    --cc=ojeda@kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=wangrui@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

all inboxes | Powered by JetHome®