Protection key 0 is the default key for all memory and will not normally come back from pkey_alloc(). But, you might still want pass it to mprotect_pkey(). This check ensures that you can use pkey 0. Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Dave Hansen <dave.hansen@intel.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Michael Ellermen <mpe@ellerman.id.au> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Ram Pai <linuxram@us.ibm.com> Cc: Shuah Khan <shuah@kernel.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/20180509171356.9E40B254@viggo.jf.intel.com Signed-off-by: Ingo Molnar <mingo@kernel.org> |
||
|---|---|---|
| .. | ||
| .gitignore | ||
| check_cc.sh | ||
| check_initial_reg_state.c | ||
| entry_from_vm86.c | ||
| fsgsbase.c | ||
| ioperm.c | ||
| iopl.c | ||
| ldt_gdt.c | ||
| Makefile | ||
| mov_ss_trap.c | ||
| mpx-debug.h | ||
| mpx-dig.c | ||
| mpx-hw.h | ||
| mpx-mini-test.c | ||
| mpx-mm.h | ||
| pkey-helpers.h | ||
| protection_keys.c | ||
| ptrace_syscall.c | ||
| raw_syscall_helper_32.S | ||
| sigreturn.c | ||
| single_step_syscall.c | ||
| syscall_arg_fault.c | ||
| syscall_nt.c | ||
| sysret_rip.c | ||
| sysret_ss_attrs.c | ||
| test_FCMOV.c | ||
| test_FCOMI.c | ||
| test_FISTTP.c | ||
| test_mremap_vdso.c | ||
| test_syscall_vdso.c | ||
| test_vdso.c | ||
| test_vsyscall.c | ||
| thunks.S | ||
| thunks_32.S | ||
| trivial_32bit_program.c | ||
| trivial_64bit_program.c | ||
| unwind_vdso.c | ||
| vdso_restorer.c | ||