HomeFreeBSD

amd64: Fix propagation of LDT updates

Description

amd64: Fix propagation of LDT updates

When a process has used sysarch(2) to specify descriptors for its
private LDT, upon rfork(RFMEM) descriptors are copied into the new child
process. Any updates to the descriptors are thus reflected to all other
processes sharing the vmspace. However, this is incorrect in the rather
obscure case where the child process was created before the LDT was
modified. Fix this by only modifying other processes which already
share the LDT.

Reported by: syzkaller
Reviewed by: kib
MFC after: 1 week
Sponsored by: The FreeBSD Foundation

Details

Provenance
markjAuthored on Jun 14 2021, 9:32 PM
Parents
rG86461b646df5: gconcat: Add some simple regression tests for the new append verb
Branches
Unknown
Tags
Unknown