All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ram Pai <linuxram@us.ibm.com>
To: Dave Hansen <dave.hansen@intel.com>
Cc: Florian Weimer <fweimer@redhat.com>,
	linux-api@vger.kernel.org, linux-mm@kvack.org
Subject: Re: pkeys: Reserve PKEY_DISABLE_READ
Date: Thu, 8 Nov 2018 12:08:59 -0800	[thread overview]
Message-ID: <20181108200859.GD5481@ram.oc3035372033.ibm.com> (raw)
In-Reply-To: <6f9c65fb-ea7e-8217-a4cc-f93e766ed9bb@intel.com>

On Thu, Nov 08, 2018 at 09:14:54AM -0800, Dave Hansen wrote:
> On 11/8/18 7:01 AM, Florian Weimer wrote:
> > Ideally, PKEY_DISABLE_READ | PKEY_DISABLE_WRITE and PKEY_DISABLE_READ |
> > PKEY_DISABLE_ACCESS would be treated as PKEY_DISABLE_ACCESS both, and a
> > line PKEY_DISABLE_READ would result in an EINVAL failure.
> 
> Sounds reasonable to me.
> 
> I don't see any urgency to do this right now.  It could easily go in
> alongside the ppc patches when those get merged.  The only thing I'd
> suggest is that we make it something slightly higher than 0x4.  It'll
> make the code easier to deal with in the kernel if we have the ABI and
> the hardware mirror each other, and if we pick 0x4 in the ABI for
> PKEY_DISABLE_READ, it might get messy if the harware choose 0x4 for
> PKEY_DISABLE_EXECUTE or something.

The hardware bits have to be decoupled from the software bits. Otherwise
we will get too constrainted and will conflict with the bit
configuration of some hardware. Powerpc implementation can deal with 0x4
or any other value.

> 
> So, let's make it 0x80 or something on x86 at least.
> 
> Also, I'll be happy to review and ack the patch to do this, but I'd
> expect the ppc guys (hi Ram!) to actually put it together.

Hi Dave! :) So what is needed? Support a new flag PKEY_DISABLE_READ, and make it
return error for all architectures?  

Or are we enhancing the symantics of pkey_alloc() to allocate keys with
just disable-read permissions.? And if so, will x86 be able to support
that semantics?


-- 
Ram Pai

  parent reply	other threads:[~2018-11-08 20:09 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-08 12:05 pkeys: Reserve PKEY_DISABLE_READ Florian Weimer
2018-11-08 14:57 ` Dave Hansen
2018-11-08 15:01   ` Florian Weimer
2018-11-08 17:14     ` Dave Hansen
2018-11-08 17:37       ` Florian Weimer
2018-11-08 20:12         ` Ram Pai
2018-11-08 20:12           ` Ram Pai
2018-11-08 20:23           ` Florian Weimer
2018-11-08 20:23             ` Florian Weimer
2018-11-09 18:09             ` Ram Pai
2018-11-09 18:09               ` Ram Pai
2018-11-12 12:00               ` Florian Weimer
2018-11-12 12:00                 ` Florian Weimer
2018-11-27 10:23                 ` Ram Pai
2018-11-27 10:23                   ` Ram Pai
2018-11-27 11:57                   ` Florian Weimer
2018-11-27 11:57                     ` Florian Weimer
2018-11-27 15:31                     ` Dave Hansen
2018-11-27 15:31                       ` Dave Hansen
2018-11-29 11:37                       ` Florian Weimer
2018-11-29 11:37                         ` Florian Weimer
2018-12-03  4:02                         ` Ram Pai
2018-12-03  4:02                           ` Ram Pai
2018-12-03 15:52                           ` Florian Weimer
2018-12-03 15:52                             ` Florian Weimer
2018-12-04  6:23                             ` Ram Pai
2018-12-04  6:23                               ` Ram Pai
2018-12-05 13:00                               ` Florian Weimer
2018-12-05 13:00                                 ` Florian Weimer
2018-12-05 20:23                                 ` Ram Pai
2018-12-05 20:23                                   ` Ram Pai
2018-12-05 16:21                           ` Andy Lutomirski
2018-12-05 16:21                             ` Andy Lutomirski
2018-12-05 20:36                             ` Ram Pai
2018-12-05 20:36                               ` Ram Pai
2018-11-08 20:08       ` Ram Pai [this message]
2018-11-08 20:11         ` Dave Hansen
2018-11-08 20:14         ` Florian Weimer
2018-11-08 19:22 ` Ram Pai
2018-11-08 19:22   ` Ram Pai
2018-11-12 10:29   ` Florian Weimer
2018-11-12 10:29     ` Florian Weimer

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=20181108200859.GD5481@ram.oc3035372033.ibm.com \
    --to=linuxram@us.ibm.com \
    --cc=dave.hansen@intel.com \
    --cc=fweimer@redhat.com \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-mm@kvack.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.