Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1411409

Re: [PATCH 7/8] pkeys: add details of system call use to Documentation/

From Jonathan Corbet <corbet@lwn.net>
Newsgroups linux.kernel
Subject Re: [PATCH 7/8] pkeys: add details of system call use to Documentation/
Date 2016-06-01 19:00 +0200
Message-ID <rFhES-2t7-13@gated-at.bofh.it> (permalink)
References <rETMd-4rJ-3@gated-at.bofh.it> <rETMd-4rJ-21@gated-at.bofh.it> <rFhvc-2p3-17@gated-at.bofh.it> <rFhvh-2p3-141@gated-at.bofh.it>
Organization LWN.net

Show all headers | View raw


On Wed, 1 Jun 2016 09:46:07 -0700
Dave Hansen <dave@sr71.net> wrote:

> On 06/01/2016 09:43 AM, Jonathan Corbet wrote:
> >> > +There are 5 system calls which directly interact with pkeys:
> >> > +
> >> > +	int pkey_alloc(unsigned long flags, unsigned long init_access_rights)
> >> > +	int pkey_free(int pkey);
> >> > +	int sys_pkey_mprotect(unsigned long start, size_t len,
> >> > +			      unsigned long prot, int pkey);
> >> > +	unsigned long pkey_get(int pkey);
> >> > +	int pkey_set(int pkey, unsigned long access_rights);  
> > sys_pkey_mprotect() should just be pkey_mprotect(), right?  
> 
> Yes, and that are a few more instances of that farther down in the file.
>  I'll fix them all up.

While you're at it (I shouldn't have hit send quite so quickly :) 

> +	sys_pkey_alloc(0, PKEY_DISABLE_WRITE | PKEY_DISABLE_READ);
> +	sys_pkey_mprotect(ptr, size, PROT_READ|PROT_WRITE);
> +	something(ptr);

That should, IMO, be something like:

	key = pkey_alloc(...);
	pkey_mprotect(ptr, size, PROT_READ|PROT_WRITE, key);

?


jon

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/8] System Calls for Memory Protection Keys Dave Hansen <dave@sr71.net> - 2016-05-31 17:30 +0200
  [PATCH 5/8] x86, pkeys: allocation/free syscalls Dave Hansen <dave@sr71.net> - 2016-05-31 17:30 +0200
    Re: [PATCH 5/8] x86, pkeys: allocation/free syscalls Jonathan Corbet <corbet@lwn.net> - 2016-06-01 20:40 +0200
      Re: [PATCH 5/8] x86, pkeys: allocation/free syscalls Dave Hansen <dave@sr71.net> - 2016-06-01 21:40 +0200
        Re: [PATCH 5/8] x86, pkeys: allocation/free syscalls "Michael Kerrisk (man-pages)" <mtk.manpages@gmail.com> - 2016-06-02 02:20 +0200
          Re: [PATCH 5/8] x86, pkeys: allocation/free syscalls Dave Hansen <dave@sr71.net> - 2016-06-02 02:20 +0200
            Re: [PATCH 5/8] x86, pkeys: allocation/free syscalls "Michael Kerrisk (man-pages)" <mtk.manpages@gmail.com> - 2016-06-03 02:30 +0200
              Re: [PATCH 5/8] x86, pkeys: allocation/free syscalls Dave Hansen <dave@sr71.net> - 2016-06-03 19:30 +0200
                Re: [PATCH 5/8] x86, pkeys: allocation/free syscalls "Michael Kerrisk (man-pages)" <mtk.manpages@gmail.com> - 2016-06-03 21:50 +0200
    Re: [PATCH 5/8] x86, pkeys: allocation/free syscalls Arnd Bergmann <arnd@arndb.de> - 2016-06-02 13:50 +0200
      Re: [PATCH 5/8] x86, pkeys: allocation/free syscalls Dave Hansen <dave@sr71.net> - 2016-06-02 23:20 +0200
  [PATCH 4/8] x86: wire up mprotect_key() system call Dave Hansen <dave@sr71.net> - 2016-05-31 17:30 +0200
  [PATCH 3/8] x86, pkeys: make mprotect_key() mask off additional vm_flags Dave Hansen <dave@sr71.net> - 2016-05-31 17:30 +0200
  [PATCH 7/8] pkeys: add details of system call use to Documentation/ Dave Hansen <dave@sr71.net> - 2016-05-31 17:30 +0200
    Re: [PATCH 7/8] pkeys: add details of system call use to  Documentation/ Jonathan Corbet <corbet@lwn.net> - 2016-06-01 18:50 +0200
      Re: [PATCH 7/8] pkeys: add details of system call use to  Documentation/ Dave Hansen <dave@sr71.net> - 2016-06-01 18:50 +0200
        Re: [PATCH 7/8] pkeys: add details of system call use to  Documentation/ Jonathan Corbet <corbet@lwn.net> - 2016-06-01 19:00 +0200
          Re: [PATCH 7/8] pkeys: add details of system call use to  Documentation/ Dave Hansen <dave@sr71.net> - 2016-06-01 19:20 +0200
  [PATCH 6/8] x86, pkeys: add pkey set/get syscalls Dave Hansen <dave@sr71.net> - 2016-05-31 17:30 +0200
  [PATCH 2/8] mm: implement new pkey_mprotect() system call Dave Hansen <dave@sr71.net> - 2016-05-31 17:40 +0200
  [PATCH 1/8] x86, pkeys: add fault handling for PF_PK page fault bit Dave Hansen <dave@sr71.net> - 2016-05-31 17:40 +0200

csiph-web