diff options
author | Andrew Bresticker <abrestic@chromium.org> | 2016-02-15 09:19:49 +0100 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2017-02-23 03:53:59 +0000 |
commit | 6cab552356fd3cd66aa3c972d3fc9ce3169b2930 (patch) | |
tree | a76ae7bc9cf869d28a1600e0906375a398b0ffe6 /arch/arm | |
parent | 6e951f8938bd4fcf9b709e0f6d85c86b1f8dde30 (diff) | |
download | linux-stable-6cab552356fd3cd66aa3c972d3fc9ce3169b2930.tar.gz linux-stable-6cab552356fd3cd66aa3c972d3fc9ce3169b2930.tar.bz2 linux-stable-6cab552356fd3cd66aa3c972d3fc9ce3169b2930.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: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'arch/arm')
0 files changed, 0 insertions, 0 deletions