linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* inconsistence in mprotect_fixup mlock_fixup madvise_update_vma
@ 2023-06-13  1:04 Jeff Xu
  2023-06-13 15:26 ` Jeff Xu
  0 siblings, 1 reply; 9+ messages in thread
From: Jeff Xu @ 2023-06-13  1:04 UTC (permalink / raw)
  To: linux-mm, linux-hardening

Hello,

There seems to be inconsistency in different VMA fixup
implementations, for example:
mlock_fixup will skip VMA that is hugettlb, etc, but those checks do
not exist in mprotect_fixup and madvise_update_vma. Wouldn't this be a
problem? the merge/split skipped by mlock_fixup, might get acted on in
the madvice/mprotect case.

mlock_fixup currently check for
if (newflags == oldflags || (oldflags & VM_SPECIAL) ||
is_vm_hugetlb_page(vma) || vma == get_gate_vma(current->mm) ||
vma_is_dax(vma) || vma_is_secretmem(vma))

Should there be a common function to handle VMA merge/split ?

Best
-Jeff


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2023-06-21 16:09 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-13  1:04 inconsistence in mprotect_fixup mlock_fixup madvise_update_vma Jeff Xu
2023-06-13 15:26 ` Jeff Xu
2023-06-13 20:16   ` Peter Xu
2023-06-13 21:29     ` Jeff Xu
2023-06-14  1:18       ` Liam R. Howlett
2023-06-14 12:57         ` Mike Rapoport
2023-06-20 22:29           ` Jeff Xu
2023-06-21  5:55             ` Mike Rapoport
2023-06-21 16:08               ` Jeff Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox