diff options
author | Ram Pai <linuxram@us.ibm.com> | 2018-12-20 12:03:30 -0800 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2018-12-21 14:46:50 +1100 |
commit | 2cd4bd192ee94848695c1c052d87913260e10f36 (patch) | |
tree | 196e1d7a1fb878dae550092bc739c5ac5e4318db /drivers/mcb | |
parent | 2f07229f02d4c55affccd11a61af4fd4b94dc436 (diff) | |
download | linux-2cd4bd192ee94848695c1c052d87913260e10f36.tar.bz2 |
powerpc/pkeys: Fix handling of pkey state across fork()
Protection key tracking information is not copied over to the
mm_struct of the child during fork(). This can cause the child to
erroneously allocate keys that were already allocated. Any allocated
execute-only key is lost aswell.
Add code; called by dup_mmap(), to copy the pkey state from parent to
child explicitly.
This problem was originally found by Dave Hansen on x86, which turns
out to be a problem on powerpc aswell.
Fixes: cf43d3b26452 ("powerpc: Enable pkey subsystem")
Cc: stable@vger.kernel.org # v4.16+
Reviewed-by: Thiago Jung Bauermann <bauerman@linux.ibm.com>
Signed-off-by: Ram Pai <linuxram@us.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'drivers/mcb')
0 files changed, 0 insertions, 0 deletions