linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Khalid Aziz <khalid.aziz@oracle.com>
To: akpm@linux-foundation.org, davem@davemloft.net
Cc: Khalid Aziz <khalid.aziz@oracle.com>,
	linux-kernel@vger.kernel.org, Khalid Aziz <khalid@gonehiking.org>
Subject: [PATCH v9 09/10] mm: Allow arch code to override copy_highpage()
Date: Fri, 20 Oct 2017 10:58:02 -0600	[thread overview]
Message-ID: <68ac9e571aac2ff252a2ee98197c78854225fefd.1508364660.git.khalid.aziz@oracle.com> (raw)
In-Reply-To: <cover.1508364660.git.khalid.aziz@oracle.com>
In-Reply-To: <cover.1508364660.git.khalid.aziz@oracle.com>

Some architectures can support metadata for memory pages and when a
page is copied, its metadata must also be copied. Sparc processors
from M7 onwards support metadata for memory pages. This metadata
provides tag based protection for access to memory pages. To maintain
this protection, the tag data must be copied to the new page when a
page is migrated across NUMA nodes. This patch allows arch specific
code to override default copy_highpage() and copy metadata along
with page data upon migration.

Signed-off-by: Khalid Aziz <khalid.aziz@oracle.com>
Cc: Khalid Aziz <khalid@gonehiking.org>
---
v9:
	- new patch

 include/linux/highmem.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/linux/highmem.h b/include/linux/highmem.h
index bb3f3297062a..77208daba265 100644
--- a/include/linux/highmem.h
+++ b/include/linux/highmem.h
@@ -236,6 +236,8 @@ static inline void copy_user_highpage(struct page *to, struct page *from,
 
 #endif
 
+#ifndef __HAVE_ARCH_COPY_HIGHPAGE
+
 static inline void copy_highpage(struct page *to, struct page *from)
 {
 	char *vfrom, *vto;
@@ -247,4 +249,6 @@ static inline void copy_highpage(struct page *to, struct page *from)
 	kunmap_atomic(vfrom);
 }
 
+#endif
+
 #endif /* _LINUX_HIGHMEM_H */
-- 
2.11.0

  parent reply	other threads:[~2017-10-20 16:58 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-20 16:57 [PATCH v9 00/10] Application Data Integrity feature introduced by SPARC M7 Khalid Aziz
2017-10-20 16:57 ` [PATCH v9 01/10] signals, sparc: Add signal codes for ADI violations Khalid Aziz
2017-10-20 16:57 ` [PATCH v9 02/10] mm, swap: Add infrastructure for saving page metadata as well on swap Khalid Aziz
2017-10-20 16:57 ` [PATCH v9 03/10] sparc64: Add support for ADI register fields, ASIs and traps Khalid Aziz
2017-10-20 16:57 ` [PATCH v9 04/10] sparc64: Add HV fault type handlers for ADI related faults Khalid Aziz
2017-10-20 16:57 ` [PATCH v9 05/10] sparc64: Add handler for "Memory Corruption Detected" trap Khalid Aziz
2017-10-20 16:57 ` [PATCH v9 06/10] sparc64: Add auxiliary vectors to report platform ADI properties Khalid Aziz
2017-10-20 16:58 ` [PATCH v9 07/10] mm: Add address parameter to arch_validate_prot() Khalid Aziz
2017-10-20 16:58 ` [PATCH v8 08/10] mm: Clear arch specific VM flags on protection change Khalid Aziz
2017-10-20 16:58 ` Khalid Aziz [this message]
2017-10-20 16:58 ` [PATCH v9 10/10] sparc64: Add support for ADI (Application Data Integrity) Khalid Aziz
2017-11-08 20:44 ` [PATCH v9 00/10] Application Data Integrity feature introduced by SPARC M7 Anthony Yznaga

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=68ac9e571aac2ff252a2ee98197c78854225fefd.1508364660.git.khalid.aziz@oracle.com \
    --to=khalid.aziz@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=davem@davemloft.net \
    --cc=khalid@gonehiking.org \
    --cc=linux-kernel@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).