Message ID | 1504910713-7094-17-git-send-email-linuxram@us.ibm.com (mailing list archive) |
---|---|
State | Changes Requested |
Headers | show |
Series | powerpc: Free up RPAGE_RSV bits | expand |
Ram Pai <linuxram@us.ibm.com> writes: > Finally this patch provides the ability for a process to > allocate and free a protection key. This must be the last patch in the series. We don't want to expose a half working interface to userspace. cheers
On Tue, Oct 24, 2017 at 05:48:15PM +0200, Michael Ellerman wrote: > Ram Pai <linuxram@us.ibm.com> writes: > > > Finally this patch provides the ability for a process to > > allocate and free a protection key. > > This must be the last patch in the series. > > We don't want to expose a half working interface to userspace. The way the patch series is organized -- this patch; even-though introduces the syscall, the syscall will fail because the pkey subsystem is enabled only by the last patch. Till than the code exists , but does a great job of failing with an appropriate return code. Hope this helps, RP
Ram Pai <linuxram@us.ibm.com> writes: > On Tue, Oct 24, 2017 at 05:48:15PM +0200, Michael Ellerman wrote: >> Ram Pai <linuxram@us.ibm.com> writes: >> >> > Finally this patch provides the ability for a process to >> > allocate and free a protection key. >> >> This must be the last patch in the series. >> >> We don't want to expose a half working interface to userspace. > > The way the patch series is organized -- this patch; even-though > introduces the syscall, the syscall will fail because the pkey subsystem > is enabled only by the last patch. Till than the code exists , but does > a great job of failing with an appropriate return code. See my previous mail :) Please don't add the syscall until it can work. cheers
diff --git a/arch/powerpc/include/asm/systbl.h b/arch/powerpc/include/asm/systbl.h index 1c94708..22dd776 100644 --- a/arch/powerpc/include/asm/systbl.h +++ b/arch/powerpc/include/asm/systbl.h @@ -388,3 +388,5 @@ COMPAT_SYS_SPU(pwritev2) SYSCALL(kexec_file_load) SYSCALL(statx) +SYSCALL(pkey_alloc) +SYSCALL(pkey_free) diff --git a/arch/powerpc/include/asm/unistd.h b/arch/powerpc/include/asm/unistd.h index 9ba11db..e0273bc 100644 --- a/arch/powerpc/include/asm/unistd.h +++ b/arch/powerpc/include/asm/unistd.h @@ -12,13 +12,11 @@ #include <uapi/asm/unistd.h> -#define NR_syscalls 384 +#define NR_syscalls 386 #define __NR__exit __NR_exit #define __IGNORE_pkey_mprotect -#define __IGNORE_pkey_alloc -#define __IGNORE_pkey_free #ifndef __ASSEMBLY__ diff --git a/arch/powerpc/include/uapi/asm/unistd.h b/arch/powerpc/include/uapi/asm/unistd.h index b85f142..7993a07 100644 --- a/arch/powerpc/include/uapi/asm/unistd.h +++ b/arch/powerpc/include/uapi/asm/unistd.h @@ -394,5 +394,7 @@ #define __NR_pwritev2 381 #define __NR_kexec_file_load 382 #define __NR_statx 383 +#define __NR_pkey_alloc 384 +#define __NR_pkey_free 385 #endif /* _UAPI_ASM_POWERPC_UNISTD_H_ */
Finally this patch provides the ability for a process to allocate and free a protection key. Signed-off-by: Ram Pai <linuxram@us.ibm.com> --- arch/powerpc/include/asm/systbl.h | 2 ++ arch/powerpc/include/asm/unistd.h | 4 +--- arch/powerpc/include/uapi/asm/unistd.h | 2 ++ 3 files changed, 5 insertions(+), 3 deletions(-)