19.01.2021 20:40, Andy Lutomirski пишет:
The implementation was rather buggy. It unconditionally marked PTEs
read-only, even for VM_SHARED mappings. I'm not sure whether this is
actually a problem, but it certainly seems unwise. More importantly, it
released the mmap lock before flushing the TLB, which could allow a racing
CoW operation to falsely believe that the underlying memory was not
writable.
I can't find any users at all of this mechanism, so just remove it.
Cc: Andrea Arcangeli <[email protected]>
Cc: Linux-MM <[email protected]>
Cc: Jason Gunthorpe <[email protected]>
Cc: [email protected]
Cc: Linus Torvalds <[email protected]>
Cc: Matthew Wilcox <[email protected]>
Cc: Jann Horn <[email protected]>
Cc: Jan Kara <[email protected]>
Cc: Yu Zhao <[email protected]>
Cc: Peter Xu <[email protected]>
Cc: Stas Sergeev <[email protected]>
Cc: Brian Gerst <[email protected]>
Signed-off-by: Andy Lutomirski <[email protected]>
---
Acked-by: [email protected]
dosemu2 just uses mprotect().
The BIOSSEG stuff in vm86_32.c is also
unused btw.