* [PATCH] poison invalid cpus
@ 2006-02-10 14:00 Olaf Hering
2006-02-11 11:55 ` [PATCH] ppc64: " Anton Blanchard
0 siblings, 1 reply; 2+ messages in thread
From: Olaf Hering @ 2006-02-10 14:00 UTC (permalink / raw)
To: Paul Mackeras, linuxppc-dev
from Anton Blanchard <anton@samba.org>
Novell bug145459
Ensure that per cpu access to !possible cpus causes a fault instead of silent
corruption.
Signed-off-by: Olaf Hering <olh@suse.de>
arch/powerpc/kernel/setup_64.c | 8 ++++++++
1 files changed, 8 insertions(+)
Index: linux-2.6.16-rc1-git3/arch/powerpc/kernel/setup_64.c
===================================================================
--- linux-2.6.16-rc1-git3.orig/arch/powerpc/kernel/setup_64.c
+++ linux-2.6.16-rc1-git3/arch/powerpc/kernel/setup_64.c
@@ -670,6 +670,14 @@ void __init setup_per_cpu_areas(void)
size = PERCPU_ENOUGH_ROOM;
#endif
+ /*
+ * Poison invalid cpus, with lots of high bits set this should
+ * always fault
+ */
+ for (i = 0; i < NR_CPUS; i++) {
+ paca[i].data_offset = 0xeeeeeeeeeeeeeeeeULL;
+ }
+
for_each_cpu(i) {
ptr = alloc_bootmem_node(NODE_DATA(cpu_to_node(i)), size);
if (!ptr)
--
short story of a lazy sysadmin:
alias appserv=wotan
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH] ppc64: poison invalid cpus
2006-02-10 14:00 [PATCH] poison invalid cpus Olaf Hering
@ 2006-02-11 11:55 ` Anton Blanchard
0 siblings, 0 replies; 2+ messages in thread
From: Anton Blanchard @ 2006-02-11 11:55 UTC (permalink / raw)
To: Olaf Hering; +Cc: linuxppc-dev
Ensure that per cpu access to !possible cpus causes a fault instead of silent
corruption.
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Olaf Hering <olh@suse.de>
---
Thanks Olaf, I had forgotten to send it out.
Index: linux-2.6.16-rc1-git3/arch/powerpc/kernel/setup_64.c
===================================================================
--- linux-2.6.16-rc1-git3.orig/arch/powerpc/kernel/setup_64.c
+++ linux-2.6.16-rc1-git3/arch/powerpc/kernel/setup_64.c
@@ -670,6 +670,14 @@ void __init setup_per_cpu_areas(void)
size = PERCPU_ENOUGH_ROOM;
#endif
+ /*
+ * Poison invalid cpus, with lots of high bits set this should
+ * always fault
+ */
+ for (i = 0; i < NR_CPUS; i++) {
+ paca[i].data_offset = 0xeeeeeeeeeeeeeeeeULL;
+ }
+
for_each_cpu(i) {
ptr = alloc_bootmem_node(NODE_DATA(cpu_to_node(i)), size);
if (!ptr)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-02-11 11:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-10 14:00 [PATCH] poison invalid cpus Olaf Hering
2006-02-11 11:55 ` [PATCH] ppc64: " Anton Blanchard
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.