linux/tools
Dave Hansen 334c0e1b3c x86/selftests/pkeys: Fork() to check for state being preserved
commit e1812933b1 upstream.

There was a bug where the per-mm pkey state was not being preserved across
fork() in the child.  fork() is performed in the pkey selftests, but all of
the pkey activity is performed in the parent.  The child does not perform
any actions sensitive to pkey state.

To make the test more sensitive to these kinds of bugs, add a fork() where
the parent exits, and execution continues in the child.

To achieve this let the key exhaustion test not terminate at the first
allocation failure and fork after 2*NR_PKEYS loops and continue in the
child.

Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: bp@alien8.de
Cc: hpa@zytor.com
Cc: peterz@infradead.org
Cc: mpe@ellerman.id.au
Cc: will.deacon@arm.com
Cc: luto@kernel.org
Cc: jroedel@suse.de
Cc: stable@vger.kernel.org
Cc: Borislav Petkov <bp@alien8.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Joerg Roedel <jroedel@suse.de>
Link: https://lkml.kernel.org/r/20190102215657.585704B7@viggo.jf.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-01-31 08:14:39 +01:00
..
accounting
arch
bpf tools: bpftool: fix potential NULL pointer dereference in do_load 2018-12-17 09:24:34 +01:00
build
cgroup
firewire
gpio
hv
iio
include x86/speculation: Add prctl() control for indirect branch speculation 2018-12-05 19:32:04 +01:00
kvm/kvm_stat
laptop
leds
lib tools lib subcmd: Don't add the kernel sources to the include path 2019-01-26 09:32:41 +01:00
memory-model
nfsd
objtool objtool: Fix segfault in .cold detection with -ffunction-sections 2018-12-17 09:24:33 +01:00
pci
pcmcia
perf perf tools: Add missing open_memstream() prototype for systems lacking it 2019-01-26 09:32:41 +01:00
power tools/power/cpupower: fix compilation with STATIC=true 2018-12-01 09:37:27 +01:00
scripts
spi
testing x86/selftests/pkeys: Fork() to check for state being preserved 2019-01-31 08:14:39 +01:00
thermal/tmon
time
usb
virtio virtio: fix test build after uio.h change 2019-01-13 09:51:03 +01:00
vm
wmi
Makefile