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: <4B38E794.7000204@windriver.com>
Date:	Mon, 28 Dec 2009 11:15:00 -0600
From:	Jason Wessel <jason.wessel@...driver.com>
To:	Peter Zijlstra <peterz@...radead.org>
CC:	linux-kernel@...r.kernel.org, kgdb-bugreport@...ts.sourceforge.net,
	mingo@...e.hu, mort@....com, linux-arch@...r.kernel.org
Subject: Re: [PATCH 05/37] kdb: core for kgdb back end

Peter Zijlstra wrote:
> On Mon, 2009-12-28 at 10:33 -0600, Jason Wessel wrote:
>>  The reason we need the attached patch is to be able to call
>> curr_task() for kdb to perform some basic per cpu task analysis while
>> the system is stopped.
> 
> Right, so this set_curr_task() thing is way scary, maybe we can simplify
> things to only expose curr_task()?


I am not sure what you had in mind for a simplification.  Is it simply to only expose the function to kdb that we use, as follows in the patch below, or something else?

There are no calls to set_curr_task() from kdb.  The curr_task() was only needed because there was no way to get at cpu_curr() outside of kernel/sched.c.  I had just assumed curr_task() was the "official" helper function.

Jason.

diff --git a/kernel/sched.c b/kernel/sched.c
index c535cc4..76fa8e1 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -9784,9 +9784,9 @@ void normalize_rt_tasks(void)
 
 #endif /* CONFIG_MAGIC_SYSRQ */
 
-#ifdef CONFIG_IA64
+#if defined(CONFIG_IA64) || defined(CONFIG_KGDB_KDB)
 /*
- * These functions are only useful for the IA64 MCA handling.
+ * These functions are only useful for the IA64 MCA handling, or kdb.
  *
  * They can only be called when the whole system has been
  * stopped - every CPU needs to be quiescent, and no scheduling
@@ -9806,6 +9806,9 @@ struct task_struct *curr_task(int cpu)
 	return cpu_curr(cpu);
 }
 
+#endif /* defined(CONFIG_IA64) || defined(CONFIG_KGDB_KDB) */
+
+#ifdef CONFIG_IA64
 /**
  * set_curr_task - set the current task for a given cpu.
  * @cpu: the processor in question.

--
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