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] [day] [month] [year] [list]
Message-ID: <175223767448.406.12939120121143461982.tip-bot2@tip-bot2>
Date: Fri, 11 Jul 2025 12:41:14 -0000
From: "tip-bot2 for Sebastian Andrzej Siewior" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: kernel test robot <oliver.sang@...el.com>,
 Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
 "Peter Zijlstra (Intel)" <peterz@...radead.org>,
 Chen Yu <yu.c.chen@...el.com>, x86@...nel.org, linux-kernel@...r.kernel.org
Subject: [tip: sched/core] lib/smp_processor_id: Make migration check
 unconditional of SMP

The following commit has been merged into the sched/core branch of tip:

Commit-ID:     2885daf47081dd1aaf1a588e9d001eb343df1f90
Gitweb:        https://git.kernel.org/tip/2885daf47081dd1aaf1a588e9d001eb343df1f90
Author:        Sebastian Andrzej Siewior <bigeasy@...utronix.de>
AuthorDate:    Thu, 10 Jul 2025 10:27:48 +02:00
Committer:     Peter Zijlstra <peterz@...radead.org>
CommitterDate: Thu, 10 Jul 2025 17:52:13 +02:00

lib/smp_processor_id: Make migration check unconditional of SMP

Commit cac5cefbade90 ("sched/smp: Make SMP unconditional")
migrate_disable() even on UP builds.
Commit 06ddd17521bf1 ("sched/smp: Always define is_percpu_thread() and
scheduler_ipi()") made is_percpu_thread() check the affinity mask
instead replying always true for UP mask.

As a consequence smp_processor_id() now complains if invoked within a
migrate_disable() section because is_percpu_thread() checks its mask and
the migration check is left out.

Make migration check unconditional of SMP.

Fixes: cac5cefbade90 ("sched/smp: Make SMP unconditional")
Closes: https://lore.kernel.org/oe-lkp/202507100448.6b88d6f1-lkp@intel.com
Reported-by: kernel test robot <oliver.sang@...el.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
Reviewed-by: Chen Yu <yu.c.chen@...el.com>
Link: https://lore.kernel.org/r/20250710082748.-DPO1rjO@linutronix.de
---
 lib/smp_processor_id.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/lib/smp_processor_id.c b/lib/smp_processor_id.c
index a2bb773..94b3f6b 100644
--- a/lib/smp_processor_id.c
+++ b/lib/smp_processor_id.c
@@ -22,10 +22,8 @@ unsigned int check_preemption_disabled(const char *what1, const char *what2)
 	if (is_percpu_thread())
 		goto out;
 
-#ifdef CONFIG_SMP
 	if (current->migration_disabled)
 		goto out;
-#endif
 
 	/*
 	 * It is valid to assume CPU-locality during early bootup:

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ