Re: [PATCH v5 7/9] mm/mremap: Move TLB flush outside page table lock

From
Linus Torvalds <torvalds@linux-foundation.org>
Date
2021-05-21 16:05:33
Also in
linux-mm
Reply to
Liam Howlett, 2021-05-21
On Fri, May 21, 2021 at 5:25 AM Liam Howlett [off-list ref] wrote:
mremap holds the mmap_sem in write mode as well, doesn't it?  How is the user thread
getting the new location?
No amount of locking protects against the HW page table walker (or,
indeed, software ones, but they are irrelevant).

And an attacker _knows_ the new address, because that's who would be
doing the mremap() in the first place - to trigger this bug.

             Linus
Thread (55 messages) 55 messages, 11 authors, last reply 2021-05-24
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help