From: Dave Hansen <dave.hansen@linux.intel.com>
To: Heiko Carstens <heiko.carstens@de.ibm.com>,
Russell King - ARM Linux <linux@armlinux.org.uk>
Cc: Mark Rutland <mark.rutland@arm.com>,
linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
Mel Gorman <mgorman@techsingularity.net>,
Thomas Gleixner <tglx@linutronix.de>,
linux-api@vger.kernel.org, linux-arch@vger.kernel.org,
linux-mm@kvack.org, torvalds@linux-foundation.org
Subject: Re: [PATCH] mm: only enable sys_pkey* when ARCH_HAS_PKEYS
Date: Tue, 8 Nov 2016 10:39:04 -0800 [thread overview]
Message-ID: <c4d177e7-c707-93aa-20be-5959d5193655@linux.intel.com> (raw)
In-Reply-To: <20161108112400.GE3528@osiris>
On 11/08/2016 03:24 AM, Heiko Carstens wrote:
> Something like this:
>
> diff --git a/mm/mprotect.c b/mm/mprotect.c
> index 11936526b08b..9fb86b107e49 100644
> --- a/mm/mprotect.c
> +++ b/mm/mprotect.c
> @@ -484,6 +484,8 @@ SYSCALL_DEFINE3(mprotect, unsigned long, start, size_t, len,
> return do_mprotect_pkey(start, len, prot, -1);
> }
>
> +#ifdef CONFIG_ARCH_HAS_PKEYS
> +
> SYSCALL_DEFINE4(pkey_mprotect, unsigned long, start, size_t, len,
> unsigned long, prot, int, pkey)
> {
> @@ -534,3 +536,4 @@ SYSCALL_DEFINE1(pkey_free, int, pkey)
> */
> return ret;
> }
> +#endif /* CONFIG_ARCH_HAS_PKEYS */
That's fine with me, fwiw. It ends up meaning that the config option
changes whether we get -ENOSPC vs. -ENOSYS, so the x86_32 behavior will
change, for instance. But, I _think_ that's OK.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2016-11-08 18:39 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-01 0:08 Mark Rutland
2016-11-02 19:15 ` Dave Hansen
2016-11-04 23:44 ` Mark Rutland
2016-11-08 9:30 ` Heiko Carstens
2016-11-08 10:41 ` Russell King - ARM Linux
2016-11-08 11:24 ` Heiko Carstens
2016-11-08 18:39 ` Dave Hansen [this message]
2016-11-08 11:39 ` Arnd Bergmann
2016-11-08 12:05 ` Heiko Carstens
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=c4d177e7-c707-93aa-20be-5959d5193655@linux.intel.com \
--to=dave.hansen@linux.intel.com \
--cc=akpm@linux-foundation.org \
--cc=heiko.carstens@de.ibm.com \
--cc=linux-api@vger.kernel.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux@armlinux.org.uk \
--cc=mark.rutland@arm.com \
--cc=mgorman@techsingularity.net \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.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