]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
amd64: Add md process flags and first P_MD_PTI flag.
authorkib <kib@FreeBSD.org>
Sat, 16 Mar 2019 11:31:01 +0000 (11:31 +0000)
committerkib <kib@FreeBSD.org>
Sat, 16 Mar 2019 11:31:01 +0000 (11:31 +0000)
commit9b5673f116be94488c7a589131864a3354001542
treea4dc6f513504def0942459570f83fe798336d04e
parentac023f52e4e8e0efa9089f68083885a9c3576f8f
amd64: Add md process flags and first P_MD_PTI flag.

PTI mode for the process pmap on exec is activated iff P_MD_PTI is set.

On exec, the existing vmspace can be reused only if pti mode of the
pmap matches the P_MD_PTI flag of the process.  Add MD
cpu_exec_vmspace_reuse() callback for exec_new_vmspace() which can
vetoed reuse of the existing vmspace.

MFC note: md_flags change struct proc KBI.

Reviewed by: jhb, markj
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D19514
13 files changed:
sys/amd64/amd64/pmap.c
sys/amd64/amd64/vm_machdep.c
sys/amd64/include/proc.h
sys/arm/arm/vm_machdep.c
sys/arm64/arm64/vm_machdep.c
sys/i386/i386/vm_machdep.c
sys/kern/kern_exec.c
sys/kern/kern_thread.c
sys/mips/mips/vm_machdep.c
sys/powerpc/powerpc/vm_machdep.c
sys/riscv/riscv/vm_machdep.c
sys/sparc64/sparc64/vm_machdep.c
sys/sys/proc.h