Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
  • Peter Xu's avatar
    mm/debug_vm_pgtable: drop RANDOM_ORVALUE trick · 0b1ef4fd
    Peter Xu authored
    Macro RANDOM_ORVALUE was used to make sure the pgtable entry will be
    populated with !none data in clear tests.
    
    The RANDOM_ORVALUE tried to cover mostly all the bits in a pgtable entry,
    even if there's no discussion on whether all the bits will be vaild.  Both
    S390 and PPC64 have their own masks to avoid touching some bits.  Now it's
    the turn for x86_64.
    
    The issue is there's a recent report from Mikhail Gavrilov showing that
    this can cause a warning with the newly added pte set check in commit
    8430557f on writable v.s.  userfaultfd-wp bit, even though the check
    itself was valid, the random pte is not.  We can choose to mask more bits
    out.
    
    However the need to have such random bits setup is questionable, as now
    it's already guaranteed to be true on below:
    
      - For pte level, the pgtable entry will be installed with value from
        pfn_pte(), where pfn points to a valid page.  Hence the pte will be
        !none already if populated with pfn_pte().
    
      - For upper...
    0b1ef4fd