1. 15 1月, 2022 1 次提交
  2. 07 11月, 2021 1 次提交
  3. 04 9月, 2021 12 次提交
  4. 02 7月, 2021 1 次提交
  5. 01 7月, 2021 2 次提交
  6. 30 6月, 2021 1 次提交
  7. 05 6月, 2021 1 次提交
  8. 01 5月, 2021 1 次提交
  9. 25 2月, 2021 2 次提交
    • A
      mm/debug_vm_pgtable/basic: iterate over entire protection_map[] · 2e326c07
      Anshuman Khandual 提交于
      Currently the basic tests just validate various page table transformations
      after starting with vm_get_page_prot(VM_READ|VM_WRITE|VM_EXEC) protection.
      Instead scan over the entire protection_map[] for better coverage.  It
      also makes sure that all these basic page table tranformations checks hold
      true irrespective of the starting protection value for the page table
      entry.  There is also a slight change in the debug print format for basic
      tests to capture the protection value it is being tested with.  The
      modified output looks something like
      
      [pte_basic_tests          ]: Validating PTE basic ()
      [pte_basic_tests          ]: Validating PTE basic (read)
      [pte_basic_tests          ]: Validating PTE basic (write)
      [pte_basic_tests          ]: Validating PTE basic (read|write)
      [pte_basic_tests          ]: Validating PTE basic (exec)
      [pte_basic_tests          ]: Validating PTE basic (read|exec)
      [pte_basic_tests          ]: Validating PTE basic (write|exec)
      [pte_basic_tests          ]: Validating PTE basic (read|write|exec)
      [pte_basic_tests          ]: Validating PTE basic (shared)
      [pte_basic_tests          ]: Validating PTE basic (read|shared)
      [pte_basic_tests          ]: Validating PTE basic (write|shared)
      [pte_basic_tests          ]: Validating PTE basic (read|write|shared)
      [pte_basic_tests          ]: Validating PTE basic (exec|shared)
      [pte_basic_tests          ]: Validating PTE basic (read|exec|shared)
      [pte_basic_tests          ]: Validating PTE basic (write|exec|shared)
      [pte_basic_tests          ]: Validating PTE basic (read|write|exec|shared)
      
      This adds a missing argument 'struct mm_struct *' in pud_basic_tests()
      test .  This never got exposed before as PUD based THP is available only
      on X86 platform where mm_pmd_folded(mm) call gets macro replaced without
      requiring the mm_struct i.e __is_defined(__PAGETABLE_PMD_FOLDED).
      
      Link: https://lkml.kernel.org/r/1611137241-26220-3-git-send-email-anshuman.khandual@arm.comSigned-off-by: NAnshuman Khandual <anshuman.khandual@arm.com>
      Tested-by: Gerald Schaefer <gerald.schaefer@de.ibm.com> [s390]
      Reviewed-by: NSteven Price <steven.price@arm.com>
      Suggested-by: NCatalin Marinas <catalin.marinas@arm.com>
      Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
      Cc: Gerald Schaefer <gerald.schaefer@linux.ibm.com>
      Cc: Paul Walmsley <paul.walmsley@sifive.com>
      Cc: Vineet Gupta <vgupta@synopsys.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      2e326c07
    • A
      mm/debug_vm_pgtable/basic: add validation for dirtiness after write protect · bb5c47ce
      Anshuman Khandual 提交于
      Patch series "mm/debug_vm_pgtable: Some minor updates", v3.
      
      This series contains some cleanups and new test suggestions from Catalin
      from an earlier discussion.
      
      https://lore.kernel.org/linux-mm/20201123142237.GF17833@gaia/
      
      This patch (of 2):
      
      This adds validation tests for dirtiness after write protect conversion
      for each page table level.  There are two new separate test types involved
      here.
      
      The first test ensures that a given page table entry does not become dirty
      after pxx_wrprotect().  This is important for platforms like arm64 which
      transfers and drops the hardware dirty bit (!PTE_RDONLY) to the software
      dirty bit while making it an write protected one.  This test ensures that
      no fresh page table entry could be created with hardware dirty bit set.
      The second test ensures that a given page table entry always preserve the
      dirty information across pxx_wrprotect().
      
      This adds two previously missing PUD level basic tests and while here
      fixes pxx_wrprotect() related typos in the documentation file.
      
      Link: https://lkml.kernel.org/r/1611137241-26220-1-git-send-email-anshuman.khandual@arm.com
      Link: https://lkml.kernel.org/r/1611137241-26220-2-git-send-email-anshuman.khandual@arm.comSigned-off-by: NAnshuman Khandual <anshuman.khandual@arm.com>
      Suggested-by: NCatalin Marinas <catalin.marinas@arm.com>
      Tested-by: Gerald Schaefer <gerald.schaefer@de.ibm.com> [s390]
      Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
      Cc: Gerald Schaefer <gerald.schaefer@linux.ibm.com>
      Cc: Vineet Gupta <vgupta@synopsys.com>
      Cc: Paul Walmsley <paul.walmsley@sifive.com>
      Cc: Steven Price <steven.price@arm.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      bb5c47ce
  10. 17 10月, 2020 11 次提交
  11. 08 8月, 2020 4 次提交
    • A
      Documentation/mm: add descriptions for arch page table helpers · b1d00007
      Anshuman Khandual 提交于
      This adds a specific description file for all arch page table helpers which
      is in sync with the semantics being tested via CONFIG_DEBUG_VM_PGTABLE. All
      future changes either to these descriptions here or the debug test should
      always remain in sync.
      
      [anshuman.khandual@arm.com: fold in Mike's patch for the rst document, fix typos in the rst document]
        Link: http://lkml.kernel.org/r/1594610587-4172-5-git-send-email-anshuman.khandual@arm.comSuggested-by: NMike Rapoport <rppt@kernel.org>
      Signed-off-by: NAnshuman Khandual <anshuman.khandual@arm.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Acked-by: NMike Rapoport <rppt@linux.ibm.com>
      Cc: Jonathan Corbet <corbet@lwn.net>
      Cc: Mike Rapoport <rppt@linux.ibm.com>
      Cc: Vineet Gupta <vgupta@synopsys.com>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Will Deacon <will@kernel.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Vasily Gorbik <gor@linux.ibm.com>
      Cc: Christian Borntraeger <borntraeger@de.ibm.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Kirill A. Shutemov <kirill@shutemov.name>
      Cc: Paul Walmsley <paul.walmsley@sifive.com>
      Cc: Palmer Dabbelt <palmer@dabbelt.com>
      Cc: Zi Yan <ziy@nvidia.com>
      Link: http://lkml.kernel.org/r/1593996516-7186-5-git-send-email-anshuman.khandual@arm.comSigned-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      b1d00007
    • A
      mm/debug_vm_pgtable: add debug prints for individual tests · 6315df41
      Anshuman Khandual 提交于
      This adds debug print information that enlists all tests getting executed
      on a given platform.  With dynamic debug enabled, the following
      information will be splashed during boot.  For compactness purpose,
      dropped both time stamp and prefix (i.e debug_vm_pgtable) from this sample
      output.
      
      [debug_vm_pgtable      ]: Validating architecture page table helpers
      [pte_basic_tests       ]: Validating PTE basic
      [pmd_basic_tests       ]: Validating PMD basic
      [p4d_basic_tests       ]: Validating P4D basic
      [pgd_basic_tests       ]: Validating PGD basic
      [pte_clear_tests       ]: Validating PTE clear
      [pmd_clear_tests       ]: Validating PMD clear
      [pte_advanced_tests    ]: Validating PTE advanced
      [pmd_advanced_tests    ]: Validating PMD advanced
      [hugetlb_advanced_tests]: Validating HugeTLB advanced
      [pmd_leaf_tests        ]: Validating PMD leaf
      [pmd_huge_tests        ]: Validating PMD huge
      [pte_savedwrite_tests  ]: Validating PTE saved write
      [pmd_savedwrite_tests  ]: Validating PMD saved write
      [pmd_populate_tests    ]: Validating PMD populate
      [pte_special_tests     ]: Validating PTE special
      [pte_protnone_tests    ]: Validating PTE protnone
      [pmd_protnone_tests    ]: Validating PMD protnone
      [pte_devmap_tests      ]: Validating PTE devmap
      [pmd_devmap_tests      ]: Validating PMD devmap
      [pte_swap_tests        ]: Validating PTE swap
      [swap_migration_tests  ]: Validating swap migration
      [hugetlb_basic_tests   ]: Validating HugeTLB basic
      [pmd_thp_tests         ]: Validating PMD based THP
      Signed-off-by: NAnshuman Khandual <anshuman.khandual@arm.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Tested-by: Vineet Gupta <vgupta@synopsys.com>	[arc]
      Reviewed-by: NZi Yan <ziy@nvidia.com>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Mike Rapoport <rppt@linux.ibm.com>
      Cc: Vineet Gupta <vgupta@synopsys.com>
      Cc: Will Deacon <will@kernel.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Vasily Gorbik <gor@linux.ibm.com>
      Cc: Christian Borntraeger <borntraeger@de.ibm.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Kirill A. Shutemov <kirill@shutemov.name>
      Cc: Paul Walmsley <paul.walmsley@sifive.com>
      Cc: Palmer Dabbelt <palmer@dabbelt.com>
      Cc: Jonathan Corbet <corbet@lwn.net>
      Cc: Mike Rapoport <rppt@kernel.org>
      Link: http://lkml.kernel.org/r/1593996516-7186-4-git-send-email-anshuman.khandual@arm.comSigned-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      6315df41
    • A
      mm/debug_vm_pgtable: add tests validating advanced arch page table helpers · a5c3b9ff
      Anshuman Khandual 提交于
      This adds new tests validating for these following arch advanced page
      table helpers.  These tests create and test specific mapping types at
      various page table levels.
      
      1. pxxp_set_wrprotect()
      2. pxxp_get_and_clear()
      3. pxxp_set_access_flags()
      4. pxxp_get_and_clear_full()
      5. pxxp_test_and_clear_young()
      6. pxx_leaf()
      7. pxx_set_huge()
      8. pxx_(clear|mk)_savedwrite()
      9. huge_pxxp_xxx()
      
      [anshuman.khandual@arm.com: drop RANDOM_ORVALUE from hugetlb_advanced_tests()]
        Link: http://lkml.kernel.org/r/1594610587-4172-3-git-send-email-anshuman.khandual@arm.comSuggested-by: NCatalin Marinas <catalin.marinas@arm.com>
      Signed-off-by: NAnshuman Khandual <anshuman.khandual@arm.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Tested-by: Vineet Gupta <vgupta@synopsys.com>	[arc]
      Reviewed-by: NZi Yan <ziy@nvidia.com>
      Cc: Mike Rapoport <rppt@linux.ibm.com>
      Cc: Vineet Gupta <vgupta@synopsys.com>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Will Deacon <will@kernel.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Vasily Gorbik <gor@linux.ibm.com>
      Cc: Christian Borntraeger <borntraeger@de.ibm.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Kirill A. Shutemov <kirill@shutemov.name>
      Cc: Paul Walmsley <paul.walmsley@sifive.com>
      Cc: Palmer Dabbelt <palmer@dabbelt.com>
      Cc: Jonathan Corbet <corbet@lwn.net>
      Cc: Mike Rapoport <rppt@kernel.org>
      Cc: Steven Price <steven.price@arm.com>
      Link: http://lkml.kernel.org/r/1593996516-7186-3-git-send-email-anshuman.khandual@arm.comSigned-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      a5c3b9ff
    • A
      mm/debug_vm_pgtable: add tests validating arch helpers for core MM features · 05289402
      Anshuman Khandual 提交于
      Patch series "mm/debug_vm_pgtable: Add some more tests", v5.
      
      This series adds some more arch page table helper validation tests which
      are related to core and advanced memory functions.  This also creates a
      documentation, enlisting expected semantics for all page table helpers as
      suggested by Mike Rapoport previously
      (https://lkml.org/lkml/2020/1/30/40).
      
      There are many TRANSPARENT_HUGEPAGE and ARCH_HAS_TRANSPARENT_HUGEPAGE_PUD
      ifdefs scattered across the test.  But consolidating all the fallback
      stubs is not very straight forward because
      ARCH_HAS_TRANSPARENT_HUGEPAGE_PUD is not explicitly dependent on
      ARCH_HAS_TRANSPARENT_HUGEPAGE.
      
      Tested on arm64, x86 platforms but only build tested on all other enabled
      platforms through ARCH_HAS_DEBUG_VM_PGTABLE i.e powerpc, arc, s390.  The
      following failure on arm64 still exists which was mentioned previously.
      It will be fixed with the upcoming THP migration on arm64 enablement
      series.
      
      WARNING .... mm/debug_vm_pgtable.c:860 debug_vm_pgtable+0x940/0xa54
      WARN_ON(!pmd_present(pmd_mkinvalid(pmd_mkhuge(pmd))))
      
      This patch (of 4):
      
      This adds new tests validating arch page table helpers for these following
      core memory features.  These tests create and test specific mapping types
      at various page table levels.
      
      1. SPECIAL mapping
      2. PROTNONE mapping
      3. DEVMAP mapping
      4. SOFTDIRTY mapping
      5. SWAP mapping
      6. MIGRATION mapping
      7. HUGETLB mapping
      8. THP mapping
      Suggested-by: NCatalin Marinas <catalin.marinas@arm.com>
      Signed-off-by: NAnshuman Khandual <anshuman.khandual@arm.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Tested-by: Vineet Gupta <vgupta@synopsys.com>	[arc]
      Reviewed-by: NZi Yan <ziy@nvidia.com>
      Cc: Mike Rapoport <rppt@linux.ibm.com>
      Cc: Vineet Gupta <vgupta@synopsys.com>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Will Deacon <will@kernel.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Vasily Gorbik <gor@linux.ibm.com>
      Cc: Christian Borntraeger <borntraeger@de.ibm.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Kirill A. Shutemov <kirill@shutemov.name>
      Cc: Paul Walmsley <paul.walmsley@sifive.com>
      Cc: Palmer Dabbelt <palmer@dabbelt.com>
      Cc: Jonathan Corbet <corbet@lwn.net>
      Cc: Mike Rapoport <rppt@kernel.org>
      Cc: Steven Price <steven.price@arm.com>
      Link: http://lkml.kernel.org/r/1594610587-4172-1-git-send-email-anshuman.khandual@arm.com
      Link: http://lkml.kernel.org/r/1593996516-7186-1-git-send-email-anshuman.khandual@arm.com
      Link: http://lkml.kernel.org/r/1593996516-7186-2-git-send-email-anshuman.khandual@arm.comSigned-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      05289402
  12. 17 7月, 2020 1 次提交
  13. 26 6月, 2020 1 次提交
  14. 11 6月, 2020 1 次提交