1. 07 11月, 2019 1 次提交
  2. 05 11月, 2019 4 次提交
  3. 28 10月, 2019 3 次提交
    • A
      powerpc/book3s64/hash: Use secondary hash for bolted mapping if the primary is full · d78d5dac
      Aneesh Kumar K.V 提交于
      With bolted hash page table entry, kernel currently only use primary hash group
      when inserting the hash page table entry. In the rare case where kernel find all the
      8 primary hash slot occupied by bolted entries, this can result in hash page
      table insert failure for bolted entries. Avoid this by using the secondary hash
      group.
      
      This is different from what kernel does for the non-bolted mapping. With
      non-bolted entries kernel will try secondary before removing an existing entry
      from hash page table group. With bolted prefer primary hash group and hence
      try to insert the page table entry by removing a slot from primary before trying
      the secondary hash group.
      Signed-off-by: NAneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      Link: https://lore.kernel.org/r/20191024093542.29777-3-aneesh.kumar@linux.ibm.com
      d78d5dac
    • A
      powerpc/pseries: Don't fail hash page table insert for bolted mapping · 75838a32
      Aneesh Kumar K.V 提交于
      If the hypervisor returned H_PTEG_FULL for H_ENTER hcall, retry a hash page table
      insert by removing a random entry from the group.
      
      After some runtime, it is very well possible to find all the 8 hash page table
      entry slot in the hpte group used for mapping. Don't fail a bolted entry insert
      in that case. With Storage class memory a user can find this error easily since
      a namespace enable/disable is equivalent to memory add/remove.
      
      This results in failures as reported below:
      
      $ ndctl create-namespace -r region1 -t pmem -m devdax -a 65536 -s 100M
      libndctl: ndctl_dax_enable: dax1.3: failed to enable
        Error: namespace1.2: failed to enable
      
      failed to create namespace: No such device or address
      
      In kernel log we find the details as below:
      
      Unable to create mapping for hot added memory 0xc000042006000000..0xc00004200d000000: -1
      dax_pmem: probe of dax1.3 failed with error -14
      
      This indicates that we failed to create a bolted hash table entry for direct-map
      address backing the namespace.
      
      We also observe failures such that not all namespaces will be enabled with
      ndctl enable-namespace all command.
      Signed-off-by: NAneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      Link: https://lore.kernel.org/r/20191024093542.29777-2-aneesh.kumar@linux.ibm.com
      75838a32
    • A
      powerpc/nvdimm: Update vmemmap_populated to check sub-section range · 5f5d6e40
      Aneesh Kumar K.V 提交于
      With commit: 7cc7867f ("mm/devm_memremap_pages: enable sub-section remap")
      pmem namespaces are remapped in 2M chunks. On architectures like ppc64 we
      can map the memmap area using 16MB hugepage size and that can cover
      a memory range of 16G.
      
      While enabling new pmem namespaces, since memory is added in sub-section chunks,
      before creating a new memmap mapping, kernel should check whether there is an
      existing memmap mapping covering the new pmem namespace. Currently, this is
      validated by checking whether the section covering the range is already
      initialized or not. Considering there can be multiple namespaces in the same
      section this can result in wrong validation. Update this to check for
      sub-sections in the range. This is done by checking for all pfns in the range we
      are mapping.
      
      We could optimize this by checking only just one pfn in each sub-section. But
      since this is not fast-path we keep this simple.
      Signed-off-by: NAneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      Link: https://lore.kernel.org/r/20190917123851.22553-1-aneesh.kumar@linux.ibm.com
      5f5d6e40
  4. 11 10月, 2019 1 次提交
  5. 27 9月, 2019 1 次提交
    • M
      mm: treewide: clarify pgtable_page_{ctor,dtor}() naming · b4ed71f5
      Mark Rutland 提交于
      The naming of pgtable_page_{ctor,dtor}() seems to have confused a few
      people, and until recently arm64 used these erroneously/pointlessly for
      other levels of page table.
      
      To make it incredibly clear that these only apply to the PTE level, and to
      align with the naming of pgtable_pmd_page_{ctor,dtor}(), let's rename them
      to pgtable_pte_page_{ctor,dtor}().
      
      These changes were generated with the following shell script:
      
      ----
      git grep -lw 'pgtable_page_.tor' | while read FILE; do
          sed -i '{s/pgtable_page_ctor/pgtable_pte_page_ctor/}' $FILE;
          sed -i '{s/pgtable_page_dtor/pgtable_pte_page_dtor/}' $FILE;
      done
      ----
      
      ... with the documentation re-flowed to remain under 80 columns, and
      whitespace fixed up in macros to keep backslashes aligned.
      
      There should be no functional change as a result of this patch.
      
      Link: http://lkml.kernel.org/r/20190722141133.3116-1-mark.rutland@arm.comSigned-off-by: NMark Rutland <mark.rutland@arm.com>
      Reviewed-by: NMike Rapoport <rppt@linux.ibm.com>
      Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>	[m68k]
      Cc: Anshuman Khandual <anshuman.khandual@arm.com>
      Cc: Matthew Wilcox <willy@infradead.org>
      Cc: Michal Hocko <mhocko@suse.com>
      Cc: Yu Zhao <yuzhao@google.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      b4ed71f5
  6. 25 9月, 2019 5 次提交
  7. 24 9月, 2019 2 次提交
  8. 21 9月, 2019 3 次提交
    • C
      powerpc/mm: Fix an Oops in kasan_mmu_init() · cbd18991
      Christophe Leroy 提交于
      Uncompressing Kernel Image ... OK
         Loading Device Tree to 01ff7000, end 01fff74f ... OK
      [    0.000000] printk: bootconsole [udbg0] enabled
      [    0.000000] BUG: Unable to handle kernel data access at 0xf818c000
      [    0.000000] Faulting instruction address: 0xc0013c7c
      [    0.000000] Thread overran stack, or stack corrupted
      [    0.000000] Oops: Kernel access of bad area, sig: 11 [#1]
      [    0.000000] BE PAGE_SIZE=16K PREEMPT
      [    0.000000] Modules linked in:
      [    0.000000] CPU: 0 PID: 0 Comm: swapper Not tainted 5.3.0-rc4-s3k-dev-00743-g5abe4a3e8fd3-dirty #2080
      [    0.000000] NIP:  c0013c7c LR: c0013310 CTR: 00000000
      [    0.000000] REGS: c0c5ff38 TRAP: 0300   Not tainted  (5.3.0-rc4-s3k-dev-00743-g5abe4a3e8fd3-dirty)
      [    0.000000] MSR:  00001032 <ME,IR,DR,RI>  CR: 99033955  XER: 80002100
      [    0.000000] DAR: f818c000 DSISR: 82000000
      [    0.000000] GPR00: c0013310 c0c5fff0 c0ad6ac0 c0c600c0 f818c031 82000000 00000000 ffffffff
      [    0.000000] GPR08: 00000000 f1f1f1f1 c0013c2c c0013304 99033955 00400008 00000000 07ff9598
      [    0.000000] GPR16: 00000000 07ffb94c 00000000 00000000 00000000 00000000 00000000 f818cfb2
      [    0.000000] GPR24: 00000000 00000000 00001000 ffffffff 00000000 c07dbf80 00000000 f818c000
      [    0.000000] NIP [c0013c7c] do_page_fault+0x50/0x904
      [    0.000000] LR [c0013310] handle_page_fault+0xc/0x38
      [    0.000000] Call Trace:
      [    0.000000] Instruction dump:
      [    0.000000] be010080 91410014 553fe8fe 3d40c001 3d20f1f1 7d800026 394a3c2c 3fffe000
      [    0.000000] 6129f1f1 900100c4 9181007c 91410018 <913f0000> 3d2001f4 6129f4f4 913f0004
      
      Don't map the early shadow page read-only yet when creating the new
      page tables for the real shadow memory, otherwise the memblock
      allocations that immediately follows to create the real shadow pages
      that are about to replace the early shadow page trigger a page fault
      if they fall into the region being worked on at the moment.
      Signed-off-by: NChristophe Leroy <christophe.leroy@c-s.fr>
      Fixes: 2edb16ef ("powerpc/32: Add KASAN support")
      Cc: stable@vger.kernel.org
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      Link: https://lore.kernel.org/r/fe86886fb8db44360417cee0dc515ad47ca6ef72.1566382750.git.christophe.leroy@c-s.fr
      cbd18991
    • C
      powerpc/mm: Add a helper to select PAGE_KERNEL_RO or PAGE_READONLY · 4c0f5d1e
      Christophe Leroy 提交于
      In a couple of places there is a need to select whether read-only
      protection of shadow pages is performed with PAGE_KERNEL_RO or with
      PAGE_READONLY.
      
      Add a helper to avoid duplicating the choice.
      Signed-off-by: NChristophe Leroy <christophe.leroy@c-s.fr>
      Cc: stable@vger.kernel.org
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      Link: https://lore.kernel.org/r/9f33f44b9cd741c4a02b3dce7b8ef9438fe2cd2a.1566382750.git.christophe.leroy@c-s.fr
      4c0f5d1e
    • A
      powerpc/book3s64/radix: Remove WARN_ON in destroy_context() · 7aec584e
      Aneesh Kumar K.V 提交于
      On failed task initialization due to memory allocation failures, we can
      call into destroy_context() with process_tb entry already populated.
      This patch forces the process_tb entry to zero in destroy_context().
      With this patch, we lose the ability to track if we are destroying a
      context without flushing the process table entry.
      
        WARNING: CPU: 4 PID: 6368 at arch/powerpc/mm/mmu_context_book3s64.c:246 destroy_context+0x58/0x340
        NIP [c0000000000875f8] destroy_context+0x58/0x340
        LR [c00000000013da18] __mmdrop+0x78/0x270
        Call Trace:
        [c000000f7db77c80] [c00000000013da18] __mmdrop+0x78/0x270
        [c000000f7db77cf0] [c0000000004d6a34] __do_execve_file.isra.13+0xbd4/0x1000
        [c000000f7db77e00] [c0000000004d7428] sys_execve+0x58/0x70
        [c000000f7db77e30] [c00000000000b388] system_call+0x5c/0x70
      Reported-by: NPriya M.A <priyama2@in.ibm.com>
      Signed-off-by: NAneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
      [mpe: Reformat/tweak comment wording]
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      Link: https://lore.kernel.org/r/20190918140103.24395-1-aneesh.kumar@linux.ibm.com
      7aec584e
  9. 13 9月, 2019 2 次提交
  10. 07 9月, 2019 2 次提交
  11. 05 9月, 2019 6 次提交
  12. 30 8月, 2019 3 次提交
  13. 28 8月, 2019 2 次提交
  14. 27 8月, 2019 5 次提交