Thread (8 messages) 8 messages, 5 authors, 2018-12-23

Re: [PATCH v2] powerpc/pkeys: copy pkey-tracking-information at fork()

From: Michael Ellerman <mpe@ellerman.id.au>
Date: 2018-12-21 00:58:00

Ram Pai [off-list ref] writes:
Pkey 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.
    
Reviewed-by: Thiago Jung Bauermann <redacted>
Signed-off-by: Ram Pai <redacted>
    
v2: do not copy if pkeys is disabled.
    	-- comment by Michael Ellermen
Thanks.

I changed the subject to:

  powerpc/pkeys: Fix handling of pkey state across fork()

And added tags:

  Fixes: cf43d3b26452 ("powerpc: Enable pkey subsystem")
  Cc: stable@vger.kernel.org # v4.16+

cheers
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help