7d77a731ba
Not sure if there will be a better solution to the make check failures, but for now we'll run with this. OBS-URL: https://build.opensuse.org/request/show/293507 OBS-URL: https://build.opensuse.org/package/show/Virtualization/qemu?expand=0&rev=242
35 lines
1.2 KiB
Diff
35 lines
1.2 KiB
Diff
From 2e978dc652969f6a7089713d8f726dda23a98205 Mon Sep 17 00:00:00 2001
|
|
From: Bruce Rogers <brogers@suse.com>
|
|
Date: Fri, 27 Mar 2015 18:03:36 -0600
|
|
Subject: [PATCH] smbios: avoid having an arbitrary _SM_ string located in F
|
|
segment
|
|
|
|
The way the SMBIOS table is located is to search the F segment for
|
|
the byte sequence _SM_ located at the beginning of a paragragh.
|
|
It was found that SeaBIOS has a "_SM_" string contained within
|
|
the image which is not part of the SMBIOS table, and it was located
|
|
ahead of the actual SMBIOS table, causing obvious problems.
|
|
|
|
Signed-off-by: Bruce Rogers <brogers@suse.com>
|
|
---
|
|
src/fw/biostables.c | 3 ++-
|
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/src/fw/biostables.c b/src/fw/biostables.c
|
|
index 50a891b..568f404 100644
|
|
--- a/src/fw/biostables.c
|
|
+++ b/src/fw/biostables.c
|
|
@@ -271,7 +271,8 @@ copy_smbios(void *pos)
|
|
if (SMBiosAddr)
|
|
return;
|
|
struct smbios_entry_point *p = pos;
|
|
- if (memcmp(p->anchor_string, "_SM_", 4))
|
|
+ // avoid storing the _SM_ string - it's problematic!
|
|
+ if (memcmp(p->anchor_string, "_SM", 3) || p->anchor_string[3] != '_' )
|
|
return;
|
|
if (checksum(pos, 0x10) != 0)
|
|
return;
|
|
--
|
|
1.9.0
|
|
|