diff options
author | Andrew Bresticker <abrestic@chromium.org> | 2016-02-15 09:19:49 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-10-28 03:45:20 -0400 |
commit | e5f8b2ed954d897f430a031bb03cfaec8a8dc2d5 (patch) | |
tree | e7b59a7b5a5626143b77d80f9a4b43384002edea /tools | |
parent | 504c848749428aa3450075b8535885140e189589 (diff) | |
download | lwn-e5f8b2ed954d897f430a031bb03cfaec8a8dc2d5.tar.gz lwn-e5f8b2ed954d897f430a031bb03cfaec8a8dc2d5.zip |
pstore/ram: Use memcpy_fromio() to save old buffer
commit d771fdf94180de2bd811ac90cba75f0f346abf8d upstream.
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: Andrew Bresticker <abrestic@chromium.org>
Signed-off-by: Enric Balletbo Serra <enric.balletbo@collabora.com>
Reviewed-by: Puneet Kumar <puneetster@chromium.org>
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions