1. 30 11月, 2021 1 次提交
  2. 29 11月, 2021 3 次提交
  3. 25 11月, 2021 1 次提交
  4. 24 11月, 2021 1 次提交
  5. 16 11月, 2021 1 次提交
  6. 15 11月, 2021 2 次提交
  7. 10 11月, 2021 1 次提交
  8. 07 11月, 2021 1 次提交
  9. 29 10月, 2021 1 次提交
  10. 27 10月, 2021 2 次提交
  11. 22 10月, 2021 9 次提交
  12. 13 10月, 2021 1 次提交
  13. 08 10月, 2021 1 次提交
  14. 09 9月, 2021 1 次提交
    • D
      mm/memory_hotplug: remove nid parameter from arch_remove_memory() · 65a2aa5f
      David Hildenbrand 提交于
      The parameter is unused, let's remove it.
      
      Link: https://lkml.kernel.org/r/20210712124052.26491-3-david@redhat.comSigned-off-by: NDavid Hildenbrand <david@redhat.com>
      Acked-by: NCatalin Marinas <catalin.marinas@arm.com>
      Acked-by: Michael Ellerman <mpe@ellerman.id.au> [powerpc]
      Acked-by: Heiko Carstens <hca@linux.ibm.com>	[s390]
      Reviewed-by: NPankaj Gupta <pankaj.gupta@ionos.com>
      Reviewed-by: NOscar Salvador <osalvador@suse.de>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Will Deacon <will@kernel.org>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Heiko Carstens <hca@linux.ibm.com>
      Cc: Vasily Gorbik <gor@linux.ibm.com>
      Cc: Christian Borntraeger <borntraeger@de.ibm.com>
      Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
      Cc: Rich Felker <dalias@libc.org>
      Cc: Dave Hansen <dave.hansen@linux.intel.com>
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      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: Anshuman Khandual <anshuman.khandual@arm.com>
      Cc: Ard Biesheuvel <ardb@kernel.org>
      Cc: Mike Rapoport <rppt@kernel.org>
      Cc: Nicholas Piggin <npiggin@gmail.com>
      Cc: Pavel Tatashin <pasha.tatashin@soleen.com>
      Cc: Baoquan He <bhe@redhat.com>
      Cc: Laurent Dufour <ldufour@linux.ibm.com>
      Cc: Sergei Trofimovich <slyfox@gentoo.org>
      Cc: Kefeng Wang <wangkefeng.wang@huawei.com>
      Cc: Michel Lespinasse <michel@lespinasse.org>
      Cc: Christophe Leroy <christophe.leroy@c-s.fr>
      Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>
      Cc: Thiago Jung Bauermann <bauerman@linux.ibm.com>
      Cc: Joe Perches <joe@perches.com>
      Cc: Pierre Morel <pmorel@linux.ibm.com>
      Cc: Jia He <justin.he@arm.com>
      Cc: Anton Blanchard <anton@ozlabs.org>
      Cc: Dan Williams <dan.j.williams@intel.com>
      Cc: Dave Jiang <dave.jiang@intel.com>
      Cc: Jason Wang <jasowang@redhat.com>
      Cc: Len Brown <lenb@kernel.org>
      Cc: "Michael S. Tsirkin" <mst@redhat.com>
      Cc: Michal Hocko <mhocko@kernel.org>
      Cc: Nathan Lynch <nathanl@linux.ibm.com>
      Cc: Pankaj Gupta <pankaj.gupta.linux@gmail.com>
      Cc: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
      Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
      Cc: Scott Cheloha <cheloha@linux.ibm.com>
      Cc: Vishal Verma <vishal.l.verma@intel.com>
      Cc: Vitaly Kuznetsov <vkuznets@redhat.com>
      Cc: Vlastimil Babka <vbabka@suse.cz>
      Cc: Wei Yang <richard.weiyang@linux.alibaba.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      65a2aa5f
  15. 01 9月, 2021 1 次提交
    • M
      powerpc/ptdump: Fix generic ptdump for 64-bit · b14b8b1e
      Michael Ellerman 提交于
      Since the conversion to generic ptdump we see crashes on 64-bit:
      
        BUG: Unable to handle kernel data access on read at 0xc0eeff7f00000000
        Faulting instruction address: 0xc00000000045e5fc
        Oops: Kernel access of bad area, sig: 11 [#1]
        ...
        NIP __walk_page_range+0x2bc/0xce0
        LR  __walk_page_range+0x240/0xce0
        Call Trace:
          __walk_page_range+0x240/0xce0 (unreliable)
          walk_page_range_novma+0x74/0xb0
          ptdump_walk_pgd+0x98/0x170
          ptdump_check_wx+0x88/0xd0
          mark_rodata_ro+0x48/0x80
          kernel_init+0x74/0x1a0
          ret_from_kernel_thread+0x5c/0x64
      
      What's happening is that have walked off the end of the kernel page
      tables, and started dereferencing junk values.
      
      That happens because we initialised the ptdump_range to span all the way
      up to 0xffffffffffffffff:
      
      static struct ptdump_range ptdump_range[] __ro_after_init = {
      	{TASK_SIZE_MAX, ~0UL},
      
      But the kernel page tables don't span that far. So on 64-bit set the end
      of the range to be the address immediately past the end of the kernel
      page tables, to limit the page table walk to valid addresses.
      
      Fixes: e0847283 ("powerpc/ptdump: Convert powerpc to GENERIC_PTDUMP")
      Reported-by: NNathan Chancellor <nathan@kernel.org>
      Tested-by: NNathan Chancellor <nathan@kernel.org>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      Link: https://lore.kernel.org/r/20210831135151.886620-1-mpe@ellerman.id.au
      b14b8b1e
  16. 26 8月, 2021 5 次提交
  17. 25 8月, 2021 5 次提交
  18. 19 8月, 2021 1 次提交
    • M
      powerpc/mm: Fix set_memory_*() against concurrent accesses · 9f7853d7
      Michael Ellerman 提交于
      Laurent reported that STRICT_MODULE_RWX was causing intermittent crashes
      on one of his systems:
      
        kernel tried to execute exec-protected page (c008000004073278) - exploit attempt? (uid: 0)
        BUG: Unable to handle kernel instruction fetch
        Faulting instruction address: 0xc008000004073278
        Oops: Kernel access of bad area, sig: 11 [#1]
        LE PAGE_SIZE=64K MMU=Radix SMP NR_CPUS=2048 NUMA pSeries
        Modules linked in: drm virtio_console fuse drm_panel_orientation_quirks ...
        CPU: 3 PID: 44 Comm: kworker/3:1 Not tainted 5.14.0-rc4+ #12
        Workqueue: events control_work_handler [virtio_console]
        NIP:  c008000004073278 LR: c008000004073278 CTR: c0000000001e9de0
        REGS: c00000002e4ef7e0 TRAP: 0400   Not tainted  (5.14.0-rc4+)
        MSR:  800000004280b033 <SF,VEC,VSX,EE,FP,ME,IR,DR,RI,LE>  CR: 24002822 XER: 200400cf
        ...
        NIP fill_queue+0xf0/0x210 [virtio_console]
        LR  fill_queue+0xf0/0x210 [virtio_console]
        Call Trace:
          fill_queue+0xb4/0x210 [virtio_console] (unreliable)
          add_port+0x1a8/0x470 [virtio_console]
          control_work_handler+0xbc/0x1e8 [virtio_console]
          process_one_work+0x290/0x590
          worker_thread+0x88/0x620
          kthread+0x194/0x1a0
          ret_from_kernel_thread+0x5c/0x64
      
      Jordan, Fabiano & Murilo were able to reproduce and identify that the
      problem is caused by the call to module_enable_ro() in do_init_module(),
      which happens after the module's init function has already been called.
      
      Our current implementation of change_page_attr() is not safe against
      concurrent accesses, because it invalidates the PTE before flushing the
      TLB and then installing the new PTE. That leaves a window in time where
      there is no valid PTE for the page, if another CPU tries to access the
      page at that time we see something like the fault above.
      
      We can't simply switch to set_pte_at()/flush TLB, because our hash MMU
      code doesn't handle a set_pte_at() of a valid PTE. See [1].
      
      But we do have pte_update(), which replaces the old PTE with the new,
      meaning there's no window where the PTE is invalid. And the hash MMU
      version hash__pte_update() deals with synchronising the hash page table
      correctly.
      
      [1]: https://lore.kernel.org/linuxppc-dev/87y318wp9r.fsf@linux.ibm.com/
      
      Fixes: 1f9ad21c ("powerpc/mm: Implement set_memory() routines")
      Reported-by: NLaurent Vivier <lvivier@redhat.com>
      Reviewed-by: NChristophe Leroy <christophe.leroy@csgroup.eu>
      Reviewed-by: NMurilo Opsfelder Araújo <muriloo@linux.ibm.com>
      Tested-by: NLaurent Vivier <lvivier@redhat.com>
      Signed-off-by: NFabiano Rosas <farosas@linux.ibm.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      Link: https://lore.kernel.org/r/20210818120518.3603172-1-mpe@ellerman.id.au
      9f7853d7
  19. 13 8月, 2021 2 次提交