[PATCH 2/4] dmicheck: drop unaligned memcpy

Leif Lindholm leif.lindholm at linaro.org
Thu Nov 15 23:25:15 UTC 2018


fwts_memcpy_unaligned was used to deal with the fact that the kernel was
giving access to smbios tables through /dev/mem on aarch64 with device
memory mappings.

This was never a valid way of accessing SMBIOS tables on aarch64, so now
/dev/mem access has been disabled on that architecture, go back to a normal
memcpy.

Signed-off-by: Leif Lindholm <leif.lindholm at linaro.org>
---
 src/dmi/dmicheck/dmicheck.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/dmi/dmicheck/dmicheck.c b/src/dmi/dmicheck/dmicheck.c
index ba6f03c0..c794973b 100644
--- a/src/dmi/dmicheck/dmicheck.c
+++ b/src/dmi/dmicheck/dmicheck.c
@@ -379,7 +379,7 @@ static void* dmi_table_smbios30(fwts_framework *fw, fwts_smbios30_entry *entry)
 		}
 		table = malloc(length);
 		if (table)
-			fwts_memcpy_unaligned(table, mem, length);
+			memcpy(table, mem, length);
 		(void)fwts_munmap(mem, length);
 		return table;
 	}
-- 
2.11.0




More information about the fwts-devel mailing list