From: Dave Hansen <dave.hansen@linux.intel.com>
To: Mark Rutland <mark.rutland@arm.com>, linux-kernel@vger.kernel.org
Cc: Andrew Morton <akpm@linux-foundation.org>,
Mel Gorman <mgorman@techsingularity.net>,
Russell King <rmk+kernel@armlinux.org.uk>,
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: Wed, 2 Nov 2016 12:15:50 -0700 [thread overview]
Message-ID: <c716d515-409f-4092-73d2-1a81db6c1ba3@linux.intel.com> (raw)
In-Reply-To: <1477958904-9903-1-git-send-email-mark.rutland@arm.com>
On 10/31/2016 05:08 PM, Mark Rutland wrote:
> When an architecture does not select CONFIG_ARCH_HAS_PKEYS, the pkey_alloc
> syscall will return -ENOSPC for all (otherwise well-formed) requests, as the
> generic implementation of mm_pkey_alloc() returns -1. The other pkey syscalls
> perform some work before always failing, in a similar fashion.
>
> This implies the absence of keys, but otherwise functional pkey support. This
> is odd, since the architecture provides no such support. Instead, it would be
> preferable to indicate that the syscall is not implemented, since this is
> effectively the case.
This makes the behavior of an x86 cpu without pkeys and an arm cpu
without pkeys differ. Is that what we want? An application that
_wants_ to use protection keys but can't needs to handle -ENOSPC anyway.
On an architecture that will never support pkeys, it makes sense to do
-ENOSYS, but that's not the case for arm, right?
--
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-02 19:15 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 [this message]
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
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=c716d515-409f-4092-73d2-1a81db6c1ba3@linux.intel.com \
--to=dave.hansen@linux.intel.com \
--cc=akpm@linux-foundation.org \
--cc=linux-api@vger.kernel.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mark.rutland@arm.com \
--cc=mgorman@techsingularity.net \
--cc=rmk+kernel@armlinux.org.uk \
--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