Skip to content
Commit d771fdf9 authored by Andrew Bresticker's avatar Andrew Bresticker Committed by Kees Cook
Browse files

pstore/ram: Use memcpy_fromio() to save old buffer



The ramoops buffer may be mapped as either I/O memory or uncached
memory.  On ARM64, this results in a device-type (strongly-ordered)
mapping.  Since unnaligned accesses to device-type memory will
generate an alignment fault (regardless of whether or not strict
alignment checking is enabled), it is not safe to use memcpy().
memcpy_fromio() is guaranteed to only use aligned accesses, so use
that instead.

Signed-off-by: default avatarAndrew Bresticker <abrestic@chromium.org>
Signed-off-by: default avatarEnric Balletbo Serra <enric.balletbo@collabora.com>
Reviewed-by: default avatarPuneet Kumar <puneetster@chromium.org>
Signed-off-by: default avatarKees Cook <keescook@chromium.org>
Cc: stable@vger.kernel.org
parent 7e75678d
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment