mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/2] x86-64: calling clear_bss before set_intr_gate with early_idt_handler
@ 2006-11-25  1:30 Yinghai Lu
  2006-11-25  6:55 ` Eric W. Biederman
  0 siblings, 1 reply; 2+ messages in thread
From: Yinghai Lu @ 2006-11-25  1:30 UTC (permalink / raw)
  To: Andrew Morton, Andi Kleen, Eric W. Biederman; +Cc: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 24 bytes --]

Please check the patch.

[-- Attachment #2: head64.patch --]
[-- Type: text/x-patch, Size: 717 bytes --]

[PATCH] x86_64: clear_bss before set_intr_gate with early_idt_handler
idt_table is in the .bss section, so clear_bss need to called at first

Signed-off-by: Yinghai Lu <yinghai.lu@amd.com> 

diff --git a/arch/x86_64/kernel/head64.c b/arch/x86_64/kernel/head64.c
index 9561eb3..cc230b9 100644
--- a/arch/x86_64/kernel/head64.c
+++ b/arch/x86_64/kernel/head64.c
@@ -57,10 +57,12 @@ void __init x86_64_start_kernel(char * r
 {
 	int i;
 
-	for (i = 0; i < 256; i++)
+	/* clear bss before set_intr_gate with early_idt_handler */
+	clear_bss();
+
+	for (i = 0; i < IDT_ENTRIES; i++)
 		set_intr_gate(i, early_idt_handler);
 	asm volatile("lidt %0" :: "m" (idt_descr));
-	clear_bss();
 
 	early_printk("Kernel alive\n");
 

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH 1/2] x86-64: calling clear_bss before set_intr_gate with early_idt_handler
  2006-11-25  1:30 [PATCH 1/2] x86-64: calling clear_bss before set_intr_gate with early_idt_handler Yinghai Lu
@ 2006-11-25  6:55 ` Eric W. Biederman
  0 siblings, 0 replies; 2+ messages in thread
From: Eric W. Biederman @ 2006-11-25  6:55 UTC (permalink / raw)
  To: Yinghai Lu; +Cc: Andrew Morton, Andi Kleen, linux-kernel

"Yinghai Lu" <yinghai.lu@amd.com> writes:

> Please check the patch.
>
> [PATCH] x86_64: clear_bss before set_intr_gate with early_idt_handler
> idt_table is in the .bss section, so clear_bss need to called at first
>
> Signed-off-by: Yinghai Lu <yinghai.lu@amd.com> 

Acked-by: Eric Biederman <ebiederm@xmission.com>

The only problem I have might be the description would read more
clearly as:
 [PATCH] x86_64: call clear_bss before set_intr_gate with early_idt_handler

 idt_table is in the .bss section, so clear_bss need to called first

Eric

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-11-25  6:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-11-25  1:30 [PATCH 1/2] x86-64: calling clear_bss before set_intr_gate with early_idt_handler Yinghai Lu
2006-11-25  6:55 ` Eric W. Biederman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®