You need to sign in or sign up before continuing.
  • Ryan Roberts's avatar
    mm: hugetlb: add huge page size param to set_huge_pte_at() · 935d4f0c
    Ryan Roberts authored
    Patch series "Fix set_huge_pte_at() panic on arm64", v2.
    
    This series fixes a bug in arm64's implementation of set_huge_pte_at(),
    which can result in an unprivileged user causing a kernel panic.  The
    problem was triggered when running the new uffd poison mm selftest for
    HUGETLB memory.  This test (and the uffd poison feature) was merged for
    v6.5-rc7.
    
    Ideally, I'd like to get this fix in for v6.6 and I've cc'ed stable
    (correctly this time) to get it backported to v6.5, where the issue first
    showed up.
    
    
    Description of Bug
    ==================
    
    arm64's huge pte implementation supports multiple huge page sizes, some of
    which are implemented in the page table with multiple contiguous entries. 
    So set_huge_pte_at() needs to work out how big the logical pte is, so that
    it can also work out how many physical ptes (or pmds) need to be written. 
    It previously did this by grabbing the folio out of the pte and querying
    its size.
    
    However, there are cases when...
    935d4f0c
radix_hugetlbpage.c 1.85 KB