ACK: [PATCH 2/4] dmicheck: drop unaligned memcpy

Alex Hung alex.hung at canonical.com
Fri Nov 16 03:10:05 UTC 2018


On 2018-11-16 7:25 a.m., Leif Lindholm wrote:
> 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;
>  	}
> 

Acked-by: Alex Hung <alex.hung at canonical.com>



More information about the fwts-devel mailing list