From: Furquan Shaikh <furquan@google.com>
To: Anton Vorontsov <anton@enomsg.org>,
Colin Cross <ccross@android.com>,
Kees Cook <keescook@chromium.org>,
Tony Luck <tony.luck@intel.com>
Cc: linux-kernel@vger.kernel.org, olofj@google.com,
adurbin@google.com, Furquan Shaikh <furquan@google.com>
Subject: [PATCH] pstore: Use memcpy_toio instead of memcpy
Date: Thu, 13 Nov 2014 10:09:18 -0800 [thread overview]
Message-ID: <1415902158-18769-1-git-send-email-furquan@google.com> (raw)
persistent_ram_update uses vmap / iomap based on whether the buffer is in memory
region or reserved region. However, both map it as non-cacheable memory. For
armv8 specifically, non-cacheable mapping requests use a memory type that has to
be accessed aligned to the request size. memcpy() doesn't guarantee that.
Signed-off-by: Furquan Shaikh <furquan@google.com>
---
fs/pstore/ram_core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/pstore/ram_core.c b/fs/pstore/ram_core.c
index 9d7b9a8..cfbc5e4 100644
--- a/fs/pstore/ram_core.c
+++ b/fs/pstore/ram_core.c
@@ -299,7 +299,7 @@ static void notrace persistent_ram_update(struct persistent_ram_zone *prz,
const void *s, unsigned int start, unsigned int count)
{
struct persistent_ram_buffer *buffer = prz->buffer;
- memcpy(buffer->data + start, s, count);
+ memcpy_toio(buffer->data + start, s, count);
persistent_ram_update_ecc(prz, start, count);
}
--
2.1.0.rc2.206.gedb03e5
next reply other threads:[~2014-11-13 18:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-13 18:09 Furquan Shaikh [this message]
2014-11-13 18:10 ` Kees Cook
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1415902158-18769-1-git-send-email-furquan@google.com \
--to=furquan@google.com \
--cc=adurbin@google.com \
--cc=anton@enomsg.org \
--cc=ccross@android.com \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=olofj@google.com \
--cc=tony.luck@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®