lkml.org 
[lkml]   [2021]   [Apr]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [RFC PATCH 13/37] mm: implement speculative handling in __handle_mm_fault().
    From
    Date
    On 4/6/21 6:44 PM, Michel Lespinasse wrote:
    > The page table tree is walked with local irqs disabled, which prevents
    > page table reclamation (similarly to what fast GUP does). The logic is
    > otherwise similar to the non-speculative path, but with additional
    > restrictions: in the speculative path, we do not handle huge pages or
    > wiring new pages tables.

    Not on most architectures. Quoting the actual comment in mm/gup.c:

    > * Before activating this code, please be aware that the following assumptions
    > * are currently made:
    > *
    > * *) Either MMU_GATHER_RCU_TABLE_FREE is enabled, and tlb_remove_table() is used to
    > * free pages containing page tables or TLB flushing requires IPI broadcast.

    On MMU_GATHER_RCU_TABLE_FREE architectures, you cannot make the
    assumption that it is safe to dereference a pointer in a page table just
    because irqs are off. You need RCU protection, too.

    You have the same error in the cover letter.

    --Andy

    \
     
     \ /
      Last update: 2021-04-07 17:37    [W:4.326 / U:0.200 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site