Linux Modules
 help / color / mirror / Atom feed
From: Petr Pavlu <petr.pavlu@suse.com>
To: Xie Yuanbin <xieyuanbin1@huawei.com>
Cc: linux@armlinux.org.uk, linusw@kernel.org, jpoimboe@kernel.org,
	rostedt@goodmis.org, mcgrof@kernel.org, da.gomez@kernel.org,
	samitolvanen@google.com, atomlin@atomlin.com,
	Xiao Junzhe <egg12138@foxmail.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-modules@vger.kernel.org,
	lilinjie8@huawei.com, liaohua4@huawei.com,
	Xiao Junzhe <xiaojunzhe1@h-partners.com>
Subject: Re: [PATCH] ARM: unwind: modules: Fix the mismatch between .ARM.exidx* and .text
Date: Thu, 6 Aug 2026 11:40:23 +0200	[thread overview]
Message-ID: <449549e3-8670-4c9e-a348-0ad3c6a521b2@suse.com> (raw)
In-Reply-To: <20260806041001.143888-1-xieyuanbin1@huawei.com>

On 8/6/26 6:10 AM, Xie Yuanbin wrote:
> For the new version of the compilers, C code that does not explicitly
> declare the section attribute may be split into sections other than
> ".text", such as ".text.unlikely" and ".text.hot". If unwind is enabled,
> this will also split the ".ARM.exidx.text.*" sections.
> 
> As scripts/module.lds.S, ".text.[0-9a-zA-Z_]*" sections will be merged
> into ".text" section. However, ".ARM.exidx.text.*" sections will not be
> merged.
> 
> For the following module code, using the gcc-16 compiler and the
> latest linux-next code, will result in dump_stack() failure.
> ```c
> void noinline stack_func_issue(void)
> {
> 	dump_stack();
> 	pr_emerg("dump stack finish!\n");
> }
> EXPORT_SYMBOL(stack_func_issue);
> 
> static int __init mmodule_init(void)
> {
> 	stack_func_issue();
> 	return 0;
> }
> 
> module_init(mmodule_init);
> ```
> ```log
> root@(none):/# busybox/usr/bin/busybox insmod test2.ko
> [   10.846774] test: loading out-of-tree module taints kernel.
> [   10.851840] CPU: 0 UID: 0 PID: 93 Comm: busybox Tainted: G        W  O        7.2.0-rc6-next-20260805-00002-g3d7269e6e98c #3 VOLUNTARY
> [   10.852350] Tainted: [W]=WARN, [O]=OOT_MODULE
> [   10.852405] Hardware name: Generic DT based system
> [   10.852516] Call trace:
> [   10.852939]  unwind_backtrace from show_stack+0x10/0x14
> [   10.853487]  show_stack from dump_stack_lvl+0x54/0x68
> [   10.853512]  dump_stack_lvl from stack_func_issue+0x8/0xc0 [test]
> [   10.854134] unwind: Index not found bf000008
> [   10.858157] dump stack finish!
> ```
> 
> Merge ".ARM.extab.text.[0-9a-z-A-Z_]*" sections into ".ARM.extab" section
> and merge ".ARM.exidx.text.[0-9a-z-A-Z_]*" sections into ".ARM.exidx"
> section to fix the issue.

A fix for this issue was posted previously:

https://lore.kernel.org/linux-modules/tencent_08845B64E5F38EB7FA1779982A071AB4A607@qq.com/

-- 
Thanks,
Petr

  parent reply	other threads:[~2026-08-06  9:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-06  4:10 [PATCH] ARM: unwind: modules: Fix the mismatch between .ARM.exidx* and .text Xie Yuanbin
2026-08-06  4:22 ` sashiko-bot
2026-08-06  9:40 ` Petr Pavlu [this message]
2026-08-06  9:58   ` Xie Yuanbin

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=449549e3-8670-4c9e-a348-0ad3c6a521b2@suse.com \
    --to=petr.pavlu@suse.com \
    --cc=atomlin@atomlin.com \
    --cc=da.gomez@kernel.org \
    --cc=egg12138@foxmail.com \
    --cc=jpoimboe@kernel.org \
    --cc=liaohua4@huawei.com \
    --cc=lilinjie8@huawei.com \
    --cc=linusw@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-modules@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=mcgrof@kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=samitolvanen@google.com \
    --cc=xiaojunzhe1@h-partners.com \
    --cc=xieyuanbin1@huawei.com \
    /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