public inbox for linuxppc-dev@ozlabs.org
 help / color / mirror / Atom feed
* Re: NULL pointer dereference when booting ppc64_guest_defconfig in QEMU on -next
       [not found]         ` <7a8faee8-0eb5-4e58-a6d5-ef711791e3f4@efficios.com>
@ 2026-03-21  1:12           ` Ritesh Harjani
  2026-03-21  2:21             ` Andrew Morton
  0 siblings, 1 reply; 4+ messages in thread
From: Ritesh Harjani @ 2026-03-21  1:12 UTC (permalink / raw)
  To: Mathieu Desnoyers, Harry Yoo (Oracle), linuxppc-dev
  Cc: Harry Yoo, Nathan Chancellor, Thomas Weißschuh,
	Michal Clapinski, Andrew Morton, Thomas Gleixner, Steven Rostedt,
	Masami Hiramatsu, linux-mm, linux-trace-kernel, linux-kernel,
	Srikar Dronamraju, Madhavan Srinivasan


++ linuxppc-dev

Mathieu Desnoyers <mathieu.desnoyers@efficios.com> writes:

> On 2026-03-20 09:31, Mathieu Desnoyers wrote:
>> On 2026-03-20 09:21, Harry Yoo (Oracle) wrote:
>>> On Fri, Mar 20, 2026 at 08:35:46AM -0400, Mathieu Desnoyers wrote:
>>>> On 2026-03-20 00:17, Harry Yoo wrote:
>>>> [...]
>>>>>> [1]: https://lore.kernel.org/20260227153730.1556542-4- 
>>>>>> mathieu.desnoyers@efficios.com/
>>>>>
>>>>> @Mathieu: In patch 1/3 description,
>>>>>> Changes since v7:
>>>>>> - Explicitly initialize the subsystem from start_kernel() right
>>>>>>     after mm_core_init() so it is up and running before the 
>>>>>> creation of
>>>>>>     the first mm at boot.
>>>>>
>>>>> But how does this work when someone calls mm_cpumask() on init_mm 
>>>>> early?
>>>>> Looks like it will behave incorrectly because get_rss_stat_items_size()
>>>>> returns zero?
>>>>
>>>> It doesn't work as expected at all. I missed that all users of 
>>>> mm_cpumask()
>>>> end up relying on get_rss_stat_items_size(), which now calls
>>>> percpu_counter_tree_items_size(), which depends on initialization from
>>>> percpu_counter_tree_subsystem_init().
>>>>
>>>> If you add a call to percpu_counter_tree_subsystem_init in
>>>> arch/powerpc/kernel/setup_arch() just before:

Even though powerpc is showing the warning because of VM_WARN_ON_ONCE(),
but this looks more of a generic problem, where use of mm_cpumask()
before and after percpu_counter_tree_items_size() could lead to
different results (as you also pointed above).

Looks like this is causing regressions in linux-next with warnings
similar to what Harry also pointed out. Do we have any solution for
this, or are we planning to hold on to this patch[1] and maybe even
remove it temporarily from linux-next, until this is fixed?

[1]: https://lore.kernel.org/all/20260227153730.1556542-1-mathieu.desnoyers@efficios.com/

[    0.000000] WARNING: arch/powerpc/mm/mmu_context.c:106 at switch_mm_irqs_off+0x1a0/0x1d0, CPU#2: swapper/0
[    0.000000] Modules linked in:
[    0.000000] CPU: 2 UID: 0 PID: 0 Comm: swapper Not tainted 7.0.0-rc4-next-20260317-00008-g5585e414f073 #4 PREEMPTLAZY
[    0.000000] Hardware name: IBM PowerNV (emulated by qemu) POWER10 0x801200 opal:v7.1 PowerNV
[    0.000000] NIP:  c00000000008f3b0 LR: c00000000008f330 CTR: c000000000090e20
[    0.000000] REGS: c000000003cb79b0 TRAP: 0700   Not tainted  (7.0.0-rc4-next-20260317-00008-g5585e414f073)
[    0.000000] MSR:  9000000002021033 <SF,HV,VEC,ME,IR,DR,RI,LE>  CR:24022224  XER: 00000000
<...>
[    0.000000] NIP [c00000000008f3b0] switch_mm_irqs_off+0x1a0/0x1d0
[    0.000000] LR [c00000000008f330] switch_mm_irqs_off+0x120/0x1d0
[    0.000000] Call Trace:
[    0.000000] [c000000003cb7c50] [0500210400000080] 0x500210400000080 (unreliable)
[    0.000000] [c000000003cb7cb0] [c0000000000ad850] start_using_temp_mm+0x34/0xb0
[    0.000000] [c000000003cb7cf0] [c0000000000ae8b8] patch_mem+0x110/0x530
[    0.000000] [c000000003cb7d70] [c000000000077f30] ftrace_modify_code+0x114/0x154
[    0.000000] [c000000003cb7dd0] [c00000000036a690] ftrace_process_locs+0x408/0x810
[    0.000000] [c000000003cb7ec0] [c0000000030584ec] ftrace_init+0x68/0x1c4
[    0.000000] [c000000003cb7f30] [c00000000300d3b8] start_kernel+0x680/0xc44
[    0.000000] [c000000003cb7fe0] [c00000000000e99c] start_here_common+0x1c/0x20

-ritesh


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: NULL pointer dereference when booting ppc64_guest_defconfig in QEMU on -next
  2026-03-21  1:12           ` NULL pointer dereference when booting ppc64_guest_defconfig in QEMU on -next Ritesh Harjani
@ 2026-03-21  2:21             ` Andrew Morton
  2026-04-02 15:30               ` Mathieu Desnoyers
  0 siblings, 1 reply; 4+ messages in thread
From: Andrew Morton @ 2026-03-21  2:21 UTC (permalink / raw)
  To: Ritesh Harjani
  Cc: Mathieu Desnoyers, Harry Yoo (Oracle), linuxppc-dev, Harry Yoo,
	Nathan Chancellor, Thomas Weißschuh, Michal Clapinski,
	Thomas Gleixner, Steven Rostedt, Masami Hiramatsu, linux-mm,
	linux-trace-kernel, linux-kernel, Srikar Dronamraju,
	Madhavan Srinivasan

On Sat, 21 Mar 2026 06:42:41 +0530 Ritesh Harjani (IBM) <ritesh.list@gmail.com> wrote:

> Looks like this is causing regressions in linux-next with warnings
> similar to what Harry also pointed out. Do we have any solution for
> this, or are we planning to hold on to this patch[1] and maybe even
> remove it temporarily from linux-next, until this is fixed?

Yes, I'll disable this patchset.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: NULL pointer dereference when booting ppc64_guest_defconfig in QEMU on -next
  2026-03-21  2:21             ` Andrew Morton
@ 2026-04-02 15:30               ` Mathieu Desnoyers
  2026-04-02 19:26                 ` Andrew Morton
  0 siblings, 1 reply; 4+ messages in thread
From: Mathieu Desnoyers @ 2026-04-02 15:30 UTC (permalink / raw)
  To: Andrew Morton, Ritesh Harjani (IBM)
  Cc: Harry Yoo (Oracle), linuxppc-dev, Harry Yoo, Nathan Chancellor,
	Thomas Weißschuh, Michal Clapinski, Thomas Gleixner,
	Steven Rostedt, Masami Hiramatsu, linux-mm, linux-trace-kernel,
	linux-kernel, Srikar Dronamraju, Madhavan Srinivasan

On 2026-03-20 22:21, Andrew Morton wrote:
> On Sat, 21 Mar 2026 06:42:41 +0530 Ritesh Harjani (IBM) <ritesh.list@gmail.com> wrote:
> 
>> Looks like this is causing regressions in linux-next with warnings
>> similar to what Harry also pointed out. Do we have any solution for
>> this, or are we planning to hold on to this patch[1] and maybe even
>> remove it temporarily from linux-next, until this is fixed?
> 
> Yes, I'll disable this patchset.

Hi Andrew,

I have prepared fixes for this issue. On which branch should I rebase
them ? Do you still have the HPCC series in your branch or should I
send it anew ?

Thanks,

Mathieu

-- 
Mathieu Desnoyers
EfficiOS Inc.
https://www.efficios.com


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: NULL pointer dereference when booting ppc64_guest_defconfig in QEMU on -next
  2026-04-02 15:30               ` Mathieu Desnoyers
@ 2026-04-02 19:26                 ` Andrew Morton
  0 siblings, 0 replies; 4+ messages in thread
From: Andrew Morton @ 2026-04-02 19:26 UTC (permalink / raw)
  To: Mathieu Desnoyers
  Cc: Ritesh Harjani (IBM), Harry Yoo (Oracle), linuxppc-dev, Harry Yoo,
	Nathan Chancellor, Thomas Weißschuh, Michal Clapinski,
	Thomas Gleixner, Steven Rostedt, Masami Hiramatsu, linux-mm,
	linux-trace-kernel, linux-kernel, Srikar Dronamraju,
	Madhavan Srinivasan

On Thu, 2 Apr 2026 11:30:53 -0400 Mathieu Desnoyers <mathieu.desnoyers@efficios.com> wrote:

> On 2026-03-20 22:21, Andrew Morton wrote:
> > On Sat, 21 Mar 2026 06:42:41 +0530 Ritesh Harjani (IBM) <ritesh.list@gmail.com> wrote:
> > 
> >> Looks like this is causing regressions in linux-next with warnings
> >> similar to what Harry also pointed out. Do we have any solution for
> >> this, or are we planning to hold on to this patch[1] and maybe even
> >> remove it temporarily from linux-next, until this is fixed?
> > 
> > Yes, I'll disable this patchset.
> 
> Hi Andrew,
> 
> I have prepared fixes for this issue. On which branch should I rebase
> them ? Do you still have the HPCC series in your branch or should I
> send it anew ?

Cool thanks.

It's best to do a full resend after -rc1 please, presumably against
mainline.  Show reviewers the latest version, refresh memories, etc.



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-04-02 19:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20260319233745.GA769346@ax162>
     [not found] ` <abzKcGiRSR_E8lLN@hyeyoo>
     [not found]   ` <7780a471-9d99-40a7-ade7-0c4594ac36c7@efficios.com>
     [not found]     ` <ab1J9ODkX5iChu-C@hyeyoo>
     [not found]       ` <7458d8fd-5922-4e0b-9cd5-91880282aaa3@efficios.com>
     [not found]         ` <7a8faee8-0eb5-4e58-a6d5-ef711791e3f4@efficios.com>
2026-03-21  1:12           ` NULL pointer dereference when booting ppc64_guest_defconfig in QEMU on -next Ritesh Harjani
2026-03-21  2:21             ` Andrew Morton
2026-04-02 15:30               ` Mathieu Desnoyers
2026-04-02 19:26                 ` Andrew Morton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox