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


Groups > linux.kernel > #1521844

Re: [PATCH] mm/pkeys: generate pkey system call code only if ARCH_HAS_PKEYS is selected

From Dave Hansen <dave.hansen@linux.intel.com>
Newsgroups linux.kernel
Subject Re: [PATCH] mm/pkeys: generate pkey system call code only if ARCH_HAS_PKEYS is selected
Date 2016-11-14 17:50 +0100
Message-ID <sDsCe-12v-27@gated-at.bofh.it> (permalink)
References <sDnsR-6fV-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 11/14/2016 03:12 AM, Heiko Carstens wrote:
> Having code for the pkey_mprotect, pkey_alloc and pkey_free system
> calls makes only sense if ARCH_HAS_PKEYS is selected. If not selected
> these system calls will always return -ENOSPC or -EINVAL.
> 
> To simplify things and have less code generate the pkey system call
> code only if ARCH_HAS_PKEYS is selected.
> 
> For architectures which have already wired up the system calls, but do
> not select ARCH_HAS_PKEYS this will result in less generated code and
> a different return code: the three system calls will now always return
> -ENOSYS, using the cond_syscall mechanism.
> 
> For architectures which have not wired up the system calls less
> unreachable code will be generated.
> 
> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>

This is fine with me.  FWIW:

Acked-by: Dave Hansen <dave.hansen@linux.intel.com>

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


Thread

[PATCH] mm/pkeys: generate pkey system call code only if ARCH_HAS_PKEYS is selected Heiko Carstens <heiko.carstens@de.ibm.com> - 2016-11-14 12:20 +0100
  Re: [PATCH] mm/pkeys: generate pkey system call code only if  ARCH_HAS_PKEYS is selected Dave Hansen <dave.hansen@linux.intel.com> - 2016-11-14 17:50 +0100

csiph-web