lkml.org 
[lkml]   [2023]   [Aug]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH mm-unstable] mm/khugepaged: fix collapse_pte_mapped_thp() versus uffd
    On Tue, Aug 22, 2023 at 04:39:43PM +0200, Jann Horn wrote:
    > > Perhaps something else will want that same behaviour in future (it's
    > > tempting, but difficult to guarantee correctness); for now, it is just
    > > userfaultfd (but by saying "_armed" rather than "_missing", I'm half-
    > > expecting uffd to add more such exceptional modes in future).
    >
    > Hm, yeah, sounds okay. (I guess we'd also run into this if we ever
    > wanted to make it possible to reliably install PTE markers with
    > madvise() or something like that, which might be nice for allowing
    > userspace to create guard pages without unnecessary extra VMAs...)

    I don't know what a userspace API for this would look like, but I have
    a dream of creating guard VMAs which only live in the maple tree and
    don't require the allocation of a struct VMA. Use some magic reserved
    pointer value like XA_ZERO_ENTRY to represent them ... seems more
    robust than putting a PTE marker in the page tables?

    \
     
     \ /
      Last update: 2023-08-22 17:25    [W:2.289 / U:0.048 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site