From: Michal Pecio <michal.pecio@gmail.com>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: bp@alien8.de, da.gomez@samsung.com, dave.hansen@linux.intel.com,
hpa@zytor.com, jpoimboe@kernel.org, linux-kernel@vger.kernel.org,
linux-modules@vger.kernel.org, mcgrof@kernel.org,
mingo@redhat.com, paulmck@kernel.org, peterz@infradead.org,
petr.pavlu@suse.com, samitolvanen@google.com, tglx@linutronix.de,
x86@kernel.org
Subject: Re: [PATCH v3 22/28] x86: Use RCU in all users of __module_address().
Date: Mon, 3 Nov 2025 11:39:07 +0100 [thread overview]
Message-ID: <20251103113907.4e647f33.michal.pecio@gmail.com> (raw)
In-Reply-To: <20251103103434.D6m23Iud@linutronix.de>
On Mon, 3 Nov 2025 11:34:34 +0100, Sebastian Andrzej Siewior wrote:
> On 2025-11-03 11:08:35 [+0100], Michal Pecio wrote:
> > Hi,
> Hi,
>
> > There is a regression report on a distribution forum which involves
> > an out of tree module on a patched kernel (yes, I know) calling
> > stack_trace_save() in task context, which arrives here and apparently
> > calls the various deref_stack_xxx() functions with preemption enabled,
> > which in turn call stack_access_ok() leading to a BUG:
> >
> > Nov 02 21:44:30 ArchBasement kernel: BUG: using smp_processor_id() in preemptible [00000000] code: Xorg/1183
> > Nov 02 21:44:30 ArchBasement kernel: caller is in_entry_stack+0x11/0x60
> > Nov 02 21:44:30 ArchBasement kernel: CPU: 0 UID: 1000 PID: 1183 Comm: Xorg Tainted: P OE 6.16.12-hardened1-1-hardened #1 PREEMPT(full) 6edb90a7a07fab33bbee72d6d5ef53ba6eec3b9c
> > Nov 02 21:44:30 ArchBasement kernel: Tainted: [P]=PROPRIETARY_MODULE, [O]=OOT_MODULE, [E]=UNSIGNED_MODULE
> > Nov 02 21:44:30 ArchBasement kernel: Hardware name: ASUS All Series/Z97-E, BIOS 0803 02/23/2016
> > Nov 02 21:44:30 ArchBasement kernel: Call Trace:
> > Nov 02 21:44:30 ArchBasement kernel: <TASK>
> > Nov 02 21:44:30 ArchBasement kernel: dump_stack_lvl+0x5d/0x80
> > Nov 02 21:44:30 ArchBasement kernel: check_preemption_disabled+0xe5/0xf0
> > Nov 02 21:44:30 ArchBasement kernel: in_entry_stack+0x11/0x60
> > Nov 02 21:44:30 ArchBasement kernel: get_stack_info+0x2c/0x80
> > Nov 02 21:44:30 ArchBasement kernel: stack_access_ok+0x51/0xa0
> > Nov 02 21:44:30 ArchBasement kernel: unwind_next_frame+0x1cb/0x7b0
> > Nov 02 21:44:30 ArchBasement kernel: ? _nv003168kms+0x42/0x50 [nvidia_modeset 90775ea8a26c5e58b97ef4b3f46eb45efa040eb2]
> > Nov 02 21:44:30 ArchBasement kernel: ? __pfx_stack_trace_consume_entry+0x10/0x10
> > Nov 02 21:44:30 ArchBasement kernel: arch_stack_walk+0xa6/0x110
> > Nov 02 21:44:30 ArchBasement kernel: ? _nv003168kms+0x42/0x50 [nvidia_modeset 90775ea8a26c5e58b97ef4b3f46eb45efa040eb2]
> > Nov 02 21:44:30 ArchBasement kernel: stack_trace_save+0x4d/0x70
> >
> > Is this nvidia doing something wrong, or a problem with this commit?
> >
> > The removed code suggests that preemption is allowed here, and as far
> > as I see, this call trace is still possible on vanilla 6.18. Perhaps
> > preempt_disable() needs to be restored around this code?
>
> Do you have the complete backtrace? Is this SMP or UP build?
Sorry, I forgot to include the link. There is also a similar warning
regarding __this_cpu_read(). Pretty sure the kernel is SMP.
https://bbs.archlinux.org/viewtopic.php?id=309960
next prev parent reply other threads:[~2025-11-03 10:39 UTC|newest]
Thread overview: 56+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-08 9:04 [PATCH v3 00/28] module: Use RCU instead of RCU-sched Sebastian Andrzej Siewior
2025-01-08 9:04 ` [PATCH v3 01/28] module: Extend the preempt disabled section in dereference_symbol_descriptor() Sebastian Andrzej Siewior
2025-01-08 9:55 ` Helge Deller
2025-01-08 10:52 ` Sebastian Andrzej Siewior
2025-01-08 9:04 ` [PATCH v3 02/28] module: Begin to move from RCU-sched to RCU Sebastian Andrzej Siewior
2025-01-08 9:04 ` [PATCH v3 03/28] module: Use proper RCU assignment in add_kallsyms() Sebastian Andrzej Siewior
2025-01-08 9:04 ` [PATCH v3 04/28] module: Use RCU in find_kallsyms_symbol() Sebastian Andrzej Siewior
2025-01-08 9:04 ` [PATCH v3 05/28] module: Use RCU in module_get_kallsym() Sebastian Andrzej Siewior
2025-01-08 9:04 ` [PATCH v3 06/28] module: Use RCU in find_module_all() Sebastian Andrzej Siewior
2025-01-08 9:04 ` [PATCH v3 07/28] module: Use RCU in __find_kallsyms_symbol_value() Sebastian Andrzej Siewior
2025-01-08 9:04 ` [PATCH v3 08/28] module: Use RCU in module_kallsyms_on_each_symbol() Sebastian Andrzej Siewior
2025-01-08 9:04 ` [PATCH v3 09/28] module: Remove module_assert_mutex_or_preempt() from try_add_tainted_module() Sebastian Andrzej Siewior
2025-01-08 9:04 ` [PATCH v3 10/28] module: Use RCU in find_symbol() Sebastian Andrzej Siewior
2025-01-08 9:04 ` [PATCH v3 11/28] module: Use RCU in __is_module_percpu_address() Sebastian Andrzej Siewior
2025-01-08 9:04 ` [PATCH v3 12/28] module: Allow __module_address() to be called from RCU section Sebastian Andrzej Siewior
2025-01-08 9:04 ` [PATCH v3 13/28] module: Use RCU in search_module_extables() Sebastian Andrzej Siewior
2025-01-08 9:04 ` [PATCH v3 14/28] module: Use RCU in all users of __module_address() Sebastian Andrzej Siewior
2025-01-08 9:04 ` [PATCH v3 15/28] module: Use RCU in all users of __module_text_address() Sebastian Andrzej Siewior
2025-04-23 15:17 ` Benjamin Berg
2025-04-23 18:16 ` Paul E. McKenney
2025-04-24 9:05 ` Sebastian Andrzej Siewior
2025-04-24 9:30 ` Benjamin Berg
2025-04-24 14:47 ` Paul E. McKenney
2025-04-24 15:17 ` Peter Zijlstra
2025-01-08 9:04 ` [PATCH v3 16/28] ARM: " Sebastian Andrzej Siewior
2025-01-08 9:04 ` [PATCH v3 17/28] arm64: " Sebastian Andrzej Siewior
2025-01-08 9:04 ` [PATCH v3 18/28] LoongArch/orc: Use RCU in all users of __module_address() Sebastian Andrzej Siewior
2025-01-08 9:04 ` [PATCH v3 19/28] LoongArch: ftrace: Use RCU in all users of __module_text_address() Sebastian Andrzej Siewior
2025-01-08 9:04 ` [PATCH v3 20/28] powerpc/ftrace: " Sebastian Andrzej Siewior
2025-01-20 10:09 ` Shrikanth Hegde
2025-01-08 9:04 ` [PATCH v3 21/28] cfi: Use RCU while invoking __module_address() Sebastian Andrzej Siewior
2025-01-08 9:04 ` [PATCH v3 22/28] x86: Use RCU in all users of __module_address() Sebastian Andrzej Siewior
2025-11-03 10:08 ` Michal Pecio
2025-11-03 10:34 ` Sebastian Andrzej Siewior
2025-11-03 10:39 ` Michal Pecio [this message]
2025-11-03 11:37 ` Sebastian Andrzej Siewior
2025-11-03 17:37 ` Michal Pecio
2025-01-08 9:04 ` [PATCH v3 23/28] jump_label: " Sebastian Andrzej Siewior
2025-01-08 9:04 ` [PATCH v3 24/28] jump_label: Use RCU in all users of __module_text_address() Sebastian Andrzej Siewior
2025-01-08 9:04 ` [PATCH v3 25/28] bpf: " Sebastian Andrzej Siewior
2025-01-09 18:38 ` Alexei Starovoitov
2025-01-09 20:54 ` Sebastian Andrzej Siewior
2025-01-09 21:00 ` Alexei Starovoitov
2025-01-29 8:47 ` [PATCH v3.5 " Sebastian Andrzej Siewior
2025-01-08 9:04 ` [PATCH v3 26/28] kprobes: " Sebastian Andrzej Siewior
2025-01-28 5:44 ` Masami Hiramatsu
2025-01-28 7:10 ` Sebastian Andrzej Siewior
2025-01-29 8:49 ` [PATCH v3.5 25/28] " Sebastian Andrzej Siewior
2025-01-08 9:04 ` [PATCH v3 27/28] static_call: " Sebastian Andrzej Siewior
2025-01-08 9:04 ` [PATCH v3 28/28] bug: Use RCU instead RCU-sched to protect module_bug_list Sebastian Andrzej Siewior
2025-01-13 11:09 ` [PATCH v3 00/28] module: Use RCU instead of RCU-sched Petr Pavlu
2025-01-13 13:23 ` Sebastian Andrzej Siewior
2025-01-24 17:49 ` Sebastian Andrzej Siewior
2025-01-27 12:22 ` Petr Pavlu
2025-01-29 8:52 ` Sebastian Andrzej Siewior
2025-01-30 13:42 ` Petr Pavlu
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=20251103113907.4e647f33.michal.pecio@gmail.com \
--to=michal.pecio@gmail.com \
--cc=bigeasy@linutronix.de \
--cc=bp@alien8.de \
--cc=da.gomez@samsung.com \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=jpoimboe@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-modules@vger.kernel.org \
--cc=mcgrof@kernel.org \
--cc=mingo@redhat.com \
--cc=paulmck@kernel.org \
--cc=peterz@infradead.org \
--cc=petr.pavlu@suse.com \
--cc=samitolvanen@google.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.