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>] [day] [month] [year] [list]
Date:	Thu, 29 Sep 2011 10:57:21 -0400
From:	Steven Rostedt <rostedt@...dmis.org>
To:	Clark Williams <clark@...hat.com>
Cc:	"Luis Claudio R. Goncalves" <lgoncalv@...hat.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	LKML <linux-kernel@...r.kernel.org>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>
Subject: [PATCH][RT] Fix warning about bounded threads migrating

Clark can you add this patch. You can fold it into the first one if you
want.

The warning for the PF_THREAD_BOUND migrating was causing false reports
because a task that is created on one CPU and bound to another CPU with
kthread_bind() may migrate on wakeup triggering this message. There is
nothing wrong with the use of migrating a thread that was recently
created.

Instead, only warn if the weight of the task's cpus_allowed is greater
than one. That is a clear warning that someone is abusing the
PF_THREAD_BOUND flag.

Signed-off-by: Steven Rostedt <rostedt@...dmis.org>

Index: linux-mrg.git/kernel/sched.c
===================================================================
--- linux-mrg.git.orig/kernel/sched.c
+++ linux-mrg.git/kernel/sched.c
@@ -2246,9 +2246,11 @@ void set_task_cpu(struct task_struct *p,
 	if (task_cpu(p) != new_cpu) {
 		p->se.nr_migrations++;
 		perf_sw_event(PERF_COUNT_SW_CPU_MIGRATIONS, 1, 1, NULL, 0);
-		if (WARN_ON(p->flags & PF_THREAD_BOUND))
-			printk(KERN_WARNING "migrating bounded task %s:%d\n",
-			       p->comm, p->pid);
+		if (WARN(p->flags & PF_THREAD_BOUND &&
+			 cpumask_weight(tsk_cpus_allowed(p)) > 1,
+			 "migrating bounded task %s:%d\n",
+			 p->comm, p->pid))
+			return;
 	}
 
 	__set_task_cpu(p, new_cpu);


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ