1. 15 5月, 2019 2 次提交
  2. 03 5月, 2019 2 次提交
  3. 29 4月, 2019 3 次提交
  4. 23 4月, 2019 1 次提交
  5. 11 4月, 2019 1 次提交
  6. 10 4月, 2019 1 次提交
  7. 03 4月, 2019 2 次提交
    • W
      locking/rwsem: Remove rwsem-spinlock.c & use rwsem-xadd.c for all archs · 390a0c62
      Waiman Long 提交于
      Currently, we have two different implementation of rwsem:
      
       1) CONFIG_RWSEM_GENERIC_SPINLOCK (rwsem-spinlock.c)
       2) CONFIG_RWSEM_XCHGADD_ALGORITHM (rwsem-xadd.c)
      
      As we are going to use a single generic implementation for rwsem-xadd.c
      and no architecture-specific code will be needed, there is no point
      in keeping two different implementations of rwsem. In most cases, the
      performance of rwsem-spinlock.c will be worse. It also doesn't get all
      the performance tuning and optimizations that had been implemented in
      rwsem-xadd.c over the years.
      
      For simplication, we are going to remove rwsem-spinlock.c and make all
      architectures use a single implementation of rwsem - rwsem-xadd.c.
      
      All references to RWSEM_GENERIC_SPINLOCK and RWSEM_XCHGADD_ALGORITHM
      in the code are removed.
      Suggested-by: NPeter Zijlstra <peterz@infradead.org>
      Signed-off-by: NWaiman Long <longman@redhat.com>
      Signed-off-by: NPeter Zijlstra (Intel) <peterz@infradead.org>
      Acked-by: NLinus Torvalds <torvalds@linux-foundation.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Davidlohr Bueso <dave@stgolabs.net>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Tim Chen <tim.c.chen@linux.intel.com>
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: linux-c6x-dev@linux-c6x.org
      Cc: linux-m68k@lists.linux-m68k.org
      Cc: linux-riscv@lists.infradead.org
      Cc: linux-um@lists.infradead.org
      Cc: linux-xtensa@linux-xtensa.org
      Cc: linuxppc-dev@lists.ozlabs.org
      Cc: nios2-dev@lists.rocketboards.org
      Cc: openrisc@lists.librecores.org
      Cc: uclinux-h8-devel@lists.sourceforge.jp
      Link: https://lkml.kernel.org/r/20190322143008.21313-3-longman@redhat.comSigned-off-by: NIngo Molnar <mingo@kernel.org>
      390a0c62
    • M
      s390/tlb: Convert to generic mmu_gather · 9de7d833
      Martin Schwidefsky 提交于
      No change in behavior intended.
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      Signed-off-by: NPeter Zijlstra (Intel) <peterz@infradead.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Dave Hansen <dave.hansen@linux.intel.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Rik van Riel <riel@surriel.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: aneesh.kumar@linux.vnet.ibm.com
      Cc: heiko.carstens@de.ibm.com
      Cc: linux@armlinux.org.uk
      Cc: npiggin@gmail.com
      Cc: will.deacon@arm.com
      Link: http://lkml.kernel.org/r/20180918125151.31744-3-schwidefsky@de.ibm.comSigned-off-by: NIngo Molnar <mingo@kernel.org>
      9de7d833
  8. 18 1月, 2019 2 次提交
  9. 21 12月, 2018 1 次提交
  10. 14 12月, 2018 1 次提交
  11. 06 12月, 2018 1 次提交
  12. 29 11月, 2018 1 次提交
  13. 23 11月, 2018 2 次提交
  14. 31 10月, 2018 2 次提交
  15. 09 10月, 2018 4 次提交
    • V
      s390/kasan: add option for 4-level paging support · 5dff0381
      Vasily Gorbik 提交于
      By default 3-level paging is used when the kernel is compiled with
      kasan support. Add 4-level paging option to support systems with more
      then 3TB of physical memory and to cover 4-level paging specific code
      with kasan as well.
      Reviewed-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      Signed-off-by: NVasily Gorbik <gor@linux.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      5dff0381
    • V
      s390/kasan: enable stack and global variables access checks · 5e785963
      Vasily Gorbik 提交于
      By defining KASAN_SHADOW_OFFSET in Kconfig stack and global variables
      memory access check instrumentation is enabled. gcc version 4.9.2 or
      newer is also required.
      Reviewed-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      Signed-off-by: NVasily Gorbik <gor@linux.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      5e785963
    • V
      s390/kasan: add initialization code and enable it · 42db5ed8
      Vasily Gorbik 提交于
      Kasan needs 1/8 of kernel virtual address space to be reserved as the
      shadow area. And eventually it requires the shadow memory offset to be
      known at compile time (passed to the compiler when full instrumentation
      is enabled).  Any value picked as the shadow area offset for 3-level
      paging would eat up identity mapping on 4-level paging (with 1PB
      shadow area size). So, the kernel sticks to 3-level paging when kasan
      is enabled. 3TB border is picked as the shadow offset.  The memory
      layout is adjusted so, that physical memory border does not exceed
      KASAN_SHADOW_START and vmemmap does not go below KASAN_SHADOW_END.
      
      Due to the fact that on s390 paging is set up very late and to cover
      more code with kasan instrumentation, temporary identity mapping and
      final shadow memory are set up early. The shadow memory mapping is
      later carried over to init_mm.pgd during paging_init.
      
      For the needs of paging structures allocation and shadow memory
      population a primitive allocator is used, which simply chops off
      memory blocks from the end of the physical memory.
      
      Kasan currenty doesn't track vmemmap and vmalloc areas.
      
      Current memory layout (for 3-level paging, 2GB physical memory).
      
      ---[ Identity Mapping ]---
      0x0000000000000000-0x0000000000100000
      ---[ Kernel Image Start ]---
      0x0000000000100000-0x0000000002b00000
      ---[ Kernel Image End ]---
      0x0000000002b00000-0x0000000080000000        2G <- physical memory border
      0x0000000080000000-0x0000030000000000     3070G PUD I
      ---[ Kasan Shadow Start ]---
      0x0000030000000000-0x0000030010000000      256M PMD RW X  <- shadow for 2G memory
      0x0000030010000000-0x0000037ff0000000   523776M PTE RO NX <- kasan zero ro page
      0x0000037ff0000000-0x0000038000000000      256M PMD RW X  <- shadow for 2G modules
      ---[ Kasan Shadow End ]---
      0x0000038000000000-0x000003d100000000      324G PUD I
      ---[ vmemmap Area ]---
      0x000003d100000000-0x000003e080000000
      ---[ vmalloc Area ]---
      0x000003e080000000-0x000003ff80000000
      ---[ Modules Area ]---
      0x000003ff80000000-0x0000040000000000        2G
      Acked-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      Signed-off-by: NVasily Gorbik <gor@linux.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      42db5ed8
    • M
      s390: add support for virtually mapped kernel stacks · ce3dc447
      Martin Schwidefsky 提交于
      With virtually mapped kernel stacks the kernel stack overflow detection
      is now fault based, every stack has a guard page in the vmalloc space.
      The panic_stack is renamed to nodat_stack and is used for all function
      that need to run without DAT, e.g. memcpy_real or do_start_kdump.
      
      The main effect is a reduction in the kernel image size as with vmap
      stacks the old style overflow checking that adds two instructions per
      function is not needed anymore. Result from bloat-o-meter:
      
      add/remove: 20/1 grow/shrink: 13/26854 up/down: 2198/-216240 (-214042)
      
      In regard to performance the micro-benchmark for fork has a hit of a
      few microseconds, allocating 4 pages in vmalloc space is more expensive
      compare to an order-2 page allocation. But with real workload I could
      not find a noticeable difference.
      Acked-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      ce3dc447
  16. 27 9月, 2018 2 次提交
  17. 16 8月, 2018 1 次提交
  18. 14 8月, 2018 1 次提交
  19. 11 8月, 2018 1 次提交
  20. 02 8月, 2018 3 次提交
  21. 25 7月, 2018 2 次提交
    • M
      s390: reenable gcc plugins · 6eedfaac
      Martin Schwidefsky 提交于
      Now that the early boot rework is upstream we can enable the gcc plugins
      again. See git commit 72f108b308707f21499e0ac05bf7370360cf06d8
      "s390: disable gcc plugins" for reference.
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      6eedfaac
    • M
      s390: disable gcc plugins · 2a6777a1
      Martin Schwidefsky 提交于
      The s390 build currently fails with the latent entropy plugin:
      
      arch/s390/kernel/als.o: In function `verify_facilities':
      als.c:(.init.text+0x24): undefined reference to `latent_entropy'
      als.c:(.init.text+0xae): undefined reference to `latent_entropy'
      make[3]: *** [arch/s390/boot/compressed/vmlinux] Error 1
      make[2]: *** [arch/s390/boot/compressed/vmlinux] Error 2
      make[1]: *** [bzImage] Error 2
      
      This will be fixed with the early boot rework from Vasily, which
      is planned for the 4.19 merge window.
      
      For 4.18 the simplest solution is to disable the gcc plugins and
      reenable them after the early boot rework is upstream.
      Reported-by: NGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      (cherry picked from commit 2fba3573)
      2a6777a1
  22. 24 7月, 2018 1 次提交
    • M
      s390: disable gcc plugins · 2fba3573
      Martin Schwidefsky 提交于
      The s390 build currently fails with the latent entropy plugin:
      
      arch/s390/kernel/als.o: In function `verify_facilities':
      als.c:(.init.text+0x24): undefined reference to `latent_entropy'
      als.c:(.init.text+0xae): undefined reference to `latent_entropy'
      make[3]: *** [arch/s390/boot/compressed/vmlinux] Error 1
      make[2]: *** [arch/s390/boot/compressed/vmlinux] Error 2
      make[1]: *** [bzImage] Error 2
      
      This will be fixed with the early boot rework from Vasily, which
      is planned for the 4.19 merge window.
      
      For 4.18 the simplest solution is to disable the gcc plugins and
      reenable them after the early boot rework is upstream.
      Reported-by: NGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      2fba3573
  23. 04 7月, 2018 1 次提交
  24. 25 6月, 2018 1 次提交
  25. 08 6月, 2018 1 次提交
    • L
      mm: introduce ARCH_HAS_PTE_SPECIAL · 3010a5ea
      Laurent Dufour 提交于
      Currently the PTE special supports is turned on in per architecture
      header files.  Most of the time, it is defined in
      arch/*/include/asm/pgtable.h depending or not on some other per
      architecture static definition.
      
      This patch introduce a new configuration variable to manage this
      directly in the Kconfig files.  It would later replace
      __HAVE_ARCH_PTE_SPECIAL.
      
      Here notes for some architecture where the definition of
      __HAVE_ARCH_PTE_SPECIAL is not obvious:
      
      arm
       __HAVE_ARCH_PTE_SPECIAL which is currently defined in
      arch/arm/include/asm/pgtable-3level.h which is included by
      arch/arm/include/asm/pgtable.h when CONFIG_ARM_LPAE is set.
      So select ARCH_HAS_PTE_SPECIAL if ARM_LPAE.
      
      powerpc
      __HAVE_ARCH_PTE_SPECIAL is defined in 2 files:
       - arch/powerpc/include/asm/book3s/64/pgtable.h
       - arch/powerpc/include/asm/pte-common.h
      The first one is included if (PPC_BOOK3S & PPC64) while the second is
      included in all the other cases.
      So select ARCH_HAS_PTE_SPECIAL all the time.
      
      sparc:
      __HAVE_ARCH_PTE_SPECIAL is defined if defined(__sparc__) &&
      defined(__arch64__) which are defined through the compiler in
      sparc/Makefile if !SPARC32 which I assume to be if SPARC64.
      So select ARCH_HAS_PTE_SPECIAL if SPARC64
      
      There is no functional change introduced by this patch.
      
      Link: http://lkml.kernel.org/r/1523433816-14460-2-git-send-email-ldufour@linux.vnet.ibm.comSigned-off-by: NLaurent Dufour <ldufour@linux.vnet.ibm.com>
      Suggested-by: NJerome Glisse <jglisse@redhat.com>
      Reviewed-by: NJerome Glisse <jglisse@redhat.com>
      Acked-by: NDavid Rientjes <rientjes@google.com>
      Cc: Michal Hocko <mhocko@kernel.org>
      Cc: "Aneesh Kumar K . V" <aneesh.kumar@linux.vnet.ibm.com>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Jonathan Corbet <corbet@lwn.net>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
      Cc: Rich Felker <dalias@libc.org>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Vineet Gupta <vgupta@synopsys.com>
      Cc: Palmer Dabbelt <palmer@sifive.com>
      Cc: Albert Ou <albert@sifive.com>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: David Rientjes <rientjes@google.com>
      Cc: Robin Murphy <robin.murphy@arm.com>
      Cc: Christophe LEROY <christophe.leroy@c-s.fr>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      3010a5ea