Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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: Andrew Bresticker <[email protected]> Signed-off-by: Enric Balletbo Serra <[email protected]> Reviewed-by: Puneet Kumar <[email protected]> Signed-off-by: Kees Cook <[email protected]> Cc: [email protected]
- Loading branch information