All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] [Xen] Check FADT's signature
@ 2007-08-09 13:35 Stefan Berger
  2007-08-09 13:33 ` Keir Fraser
  0 siblings, 1 reply; 21+ messages in thread
From: Stefan Berger @ 2007-08-09 13:35 UTC (permalink / raw)
  To: xen-devel; +Cc: Keir Fraser

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

Check the signature of the alleged FADT and only parse it if it really
is the FADT and not something else. I understand that this is not the
real solution, but prevents other bad things from happening, like the
timer going backwards if a bogus PM-Timer port is picked up.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>


[-- Attachment #2: fadt_check.diff --]
[-- Type: text/x-patch, Size: 527 bytes --]

diff -r 7c5c3aa858cc xen/arch/x86/acpi/boot.c
--- a/xen/arch/x86/acpi/boot.c	Tue Jul 31 15:09:45 2007 +0100
+++ b/xen/arch/x86/acpi/boot.c	Thu Aug 09 09:08:52 2007 -0400
@@ -473,6 +476,12 @@ static int __init acpi_parse_fadt(unsign
 		return 0;
 	}
 
+	if (strncmp(fadt->signature, "FADT", 4)) {
+		printk(KERN_ERR PREFIX "Invalid FADT signature %.4s\n",
+			fadt->signature);
+		return 0;
+	}
+
 #ifdef	CONFIG_ACPI_INTERPRETER
 	/* initialize sci_int early for INT_SRC_OVR MADT parsing */
 	acpi_fadt.sci_int = fadt->sci_int;

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

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

end of thread, other threads:[~2007-08-27 10:50 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-09 13:35 [PATCH] [Xen] Check FADT's signature Stefan Berger
2007-08-09 13:33 ` Keir Fraser
2007-08-09 17:54   ` Stefan Berger
2007-08-10  6:55     ` Keir Fraser
2007-08-10 11:36       ` Stefan Berger
2007-08-10 13:23         ` Keir Fraser
2007-08-10  8:51     ` Jan Beulich
2007-08-10 13:58       ` Stefan Berger
2007-08-10 15:09         ` Keir Fraser
2007-08-10 15:35           ` Stefan Berger
2007-08-10 15:58             ` Keir Fraser
2007-08-10 16:11               ` Stefan Berger
2007-08-10 16:15                 ` Keir Fraser
2007-08-10 17:00                   ` Stefan Berger
2007-08-10 18:21                     ` Keir Fraser
2007-08-10 19:15                       ` Keir Fraser
2007-08-24  6:19                         ` Stefan Berger
2007-08-24  7:13                           ` Jan Beulich
2007-08-24 15:04                             ` Keir Fraser
2007-08-24 15:20                           ` Keir Fraser
2007-08-27 10:50                             ` Stefan Berger

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.