From: Dave Hansen <dave.hansen-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
To: Heiko Carstens
<heiko.carstens-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org>,
Russell King - ARM Linux
<linux-I+IVW8TIWO2tmTQ+vhA3Yw@public.gmane.org>
Cc: Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Andrew Morton
<akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>,
Mel Gorman
<mgorman-3eNAlZScCAx27rWaFMvyedHuzzzSOjJt@public.gmane.org>,
Thomas Gleixner <tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>,
linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-arch-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org,
torvalds-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.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.
WARNING: multiple messages have this Message-ID (diff)
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)
Message-ID: <20161108183904.yD1U4jFQTzigU0zKK4X60ntJldg0JXdt0zob9SWQ6vk@z> (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.
next prev parent reply other threads:[~2016-11-08 18:39 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-01 0:08 [PATCH] mm: only enable sys_pkey* when ARCH_HAS_PKEYS Mark Rutland
2016-11-01 0:08 ` Mark Rutland
2016-11-02 19:15 ` Dave Hansen
2016-11-02 19:15 ` Dave Hansen
2016-11-04 23:44 ` Mark Rutland
2016-11-04 23:44 ` Mark Rutland
2016-11-08 9:30 ` Heiko Carstens
2016-11-08 9:30 ` Heiko Carstens
2016-11-08 10:41 ` Russell King - ARM Linux
2016-11-08 10:41 ` Russell King - ARM Linux
[not found] ` <20161108104112.GM1041-l+eeeJia6m9URfEZ8mYm6t73F7V6hmMc@public.gmane.org>
2016-11-08 11:24 ` Heiko Carstens
2016-11-08 11:24 ` Heiko Carstens
2016-11-08 18:39 ` Dave Hansen [this message]
2016-11-08 18:39 ` Dave Hansen
2016-11-08 11:39 ` Arnd Bergmann
2016-11-08 11:39 ` Arnd Bergmann
2016-11-08 12:05 ` Heiko Carstens
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-vuqaysv1563yd54fqh9/ca@public.gmane.org \
--cc=akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org \
--cc=heiko.carstens-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org \
--cc=linux-I+IVW8TIWO2tmTQ+vhA3Yw@public.gmane.org \
--cc=linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-arch-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org \
--cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
--cc=mgorman-3eNAlZScCAx27rWaFMvyedHuzzzSOjJt@public.gmane.org \
--cc=tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org \
--cc=torvalds-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.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