lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87ikfolvjx.fsf@yellow.woof>
Date: Wed, 05 Nov 2025 09:42:42 +0100
From: Nam Cao <namcao@...utronix.de>
To: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Cc: Ingo Molnar <mingo@...nel.org>, Peter Zijlstra <peterz@...radead.org>,
 Juri Lelli <juri.lelli@...hat.com>, Vincent Guittot
 <vincent.guittot@...aro.org>, Dietmar Eggemann <dietmar.eggemann@....com>,
 Mel Gorman <mgorman@...e.de>, Shrikanth Hegde <sshegde@...ux.ibm.com>,
 Steven Rostedt <rostedt@...dmis.org>, Valentin Schneider
 <vschneid@...hat.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] smp: Suppress false DEBUG_PREEMPT warning in
 smp_call_on_cpu()

Sebastian Andrzej Siewior <bigeasy@...utronix.de> writes:
>> This appears after commit 06ddd17521bf ("sched/smp: Always define
>> is_percpu_thread() and scheduler_ipi()"). Before this commit,
>> is_percpu_thread() always returns true on UP kernel and thus
>> debug_smp_processor_id() always sees a per-cpu thread and never warns. But
>> now is_percpu_thread() returns false for this case.
>> 
>> Suppress this warning with a migrate_disable()+migrate_enable() pair.
>
> Right. This is one of the possibilities. The other one would be to also
> workqueue on UP and preserve the same semantic.
> I don't mind this.

Yeah it's a tradeoff. I'm not sure if someone will be bothered by the
overhead that workqueue introduces, so I use this cheap solution.

>> +
>> +	/* suppress warnings from debug_smp_processor_id() */
>
> If you want to add a comment, what about something like
>
>   /* Preserve not being migratable such as SMP variant does */ 

Wouldn't it be a bit misleading? It's true that technically SMP variant
is not migratable, but that's because it is a per-cpu thread, not
because of migrate_disable(). To me, the comment sounds like that there
is also a migrate_disable() in SMP variant.

Nam

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ