[coreboot-gerrit] New patch to review for coreboot: util/nvramtool: Use correct virtual address when mapping tables

Timothy Pearson (tpearson@raptorengineeringinc.com) gerrit at coreboot.org
Tue Dec 1 20:52:19 CET 2015


Timothy Pearson (tpearson at raptorengineeringinc.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/12619

-gerrit

commit 98d1ea3aa91f6bf7f78d694922670cf938d1b01b
Author: Timothy Pearson <tpearson at raptorengineeringinc.com>
Date:   Tue Dec 1 13:49:59 2015 -0600

    util/nvramtool: Use correct virtual address when mapping tables
    
    The existing code used a stale pointer from a previously unmapped
    region of memory when parsing the coreboot tables.  Use the correct
    pointer from the currently mapped memory region when parsing.
    
    Change-Id: Id9a1c70655fe25bc079e5bee55f15adf674694f8
    Signed-off-by: Timothy Pearson <tpearson at raptorengineeringinc.com>
---
 util/nvramtool/lbtable.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/util/nvramtool/lbtable.c b/util/nvramtool/lbtable.c
index 1c7bc0a..5db61c5 100644
--- a/util/nvramtool/lbtable.c
+++ b/util/nvramtool/lbtable.c
@@ -489,6 +489,9 @@ static const struct lb_header *lbtable_scan(unsigned long start,
 		}
 
 		map_pages(p, table->table_bytes + sizeof(*table));
+
+		table = (const struct lb_header *)phystov(p);
+
 		/* validate table checksum */
 		if (table->table_checksum !=
 		    compute_ip_checksum(((char *)table) + sizeof(*table),



More information about the coreboot-gerrit mailing list