summaryrefslogtreecommitdiff
path: root/init/do_mounts_rd.c
diff options
context:
space:
mode:
authorBenjamin Gray <bgray@linux.ibm.com>2024-04-17 21:23:19 +1000
committerMichael Ellerman <mpe@ellerman.id.au>2024-05-03 20:46:51 +1000
commitbbd99922d0f4518518282217159666c679c6a0d1 (patch)
tree6c2d20d8594157030d86f67582c38370560ccf0b /init/do_mounts_rd.c
parent75171f06c4507c3b6b5a69d793879fb20d108bb1 (diff)
powerpc/dexcr: Reset DEXCR value across exec
Inheriting the DEXCR across exec can have security and usability concerns. If a program is compiled with hash instructions it generally expects to run with NPHIE enabled. But if the parent process disables NPHIE then if it's not careful it will be disabled for any children too and the protection offered by hash checks is basically worthless. This patch introduces a per-process reset value that new execs in a particular process tree are initialized with. This enables fine grained control over what DEXCR value child processes run with by default. For example, containers running legacy binaries that expect hash instructions to act as NOPs could configure the reset value of the container root to control the default reset value for all members of the container. Signed-off-by: Benjamin Gray <bgray@linux.ibm.com> [mpe: Add missing SPDX tag on dexcr.c] Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://msgid.link/20240417112325.728010-4-bgray@linux.ibm.com
Diffstat (limited to 'init/do_mounts_rd.c')
0 files changed, 0 insertions, 0 deletions