Skip to content
Snippets Groups Projects
  1. Jun 08, 2018
    • Laurent Dufour's avatar
      mm: introduce ARCH_HAS_PTE_SPECIAL · 3010a5ea
      Laurent Dufour authored
      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.com
      
      
      Signed-off-by: default avatarLaurent Dufour <ldufour@linux.vnet.ibm.com>
      Suggested-by: default avatarJerome Glisse <jglisse@redhat.com>
      Reviewed-by: default avatarJerome Glisse <jglisse@redhat.com>
      Acked-by: default avatarDavid 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: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      3010a5ea
  2. May 10, 2018
  3. May 08, 2018
  4. Mar 26, 2018
    • Arnd Bergmann's avatar
      Documentation: arch-support: remove obsolete architectures · 1ea5afd4
      Arnd Bergmann authored
      
      A number of architecture ports are obsolete and getting dropped,
      so we no longer want to track the respective features.
      
      We already removed the lines for metag and mn10300, this does
      the same edits for all the others.
      
      For the remaining 21 architectures, this shows how many are known
      to implement each given feature:
      
      19 time/modern-timekeeping/arch-support.txt
      19 time/clockevents/arch-support.txt
      15 core/tracehook/arch-support.txt
      14 core/generic-idle-thread/arch-support.txt
      13 locking/lockdep/arch-support.txt
      12 io/dma-api-debug/arch-support.txt
      11 debug/kgdb/arch-support.txt
      10 time/virt-cpuacct/arch-support.txt
       9 debug/kretprobes/arch-support.txt
       9 debug/kprobes/arch-support.txt
       8 vm/THP/arch-support.txt
       8 vm/pte_special/arch-support.txt
       8 vm/numa-memblock/arch-support.txt
       8 io/sg-chain/arch-support.txt
       7 perf/kprobes-event/arch-support.txt
       7 locking/rwsem-optimized/arch-support.txt
       7 debug/gcov-profile-all/arch-support.txt
       7 core/jump-labels/arch-support.txt
       7 core/BPF-JIT/arch-support.txt
       6 vm/ELF-ASLR/arch-support.txt
       6 time/context-tracking/arch-support.txt
       6 seccomp/seccomp-filter/arch-support.txt
       6 debug/stackprotector/arch-support.txt
       5 time/irq-time-acct/arch-support.txt
       5 io/dma-contiguous/arch-support.txt
       5 debug/uprobes/arch-support.txt
       4 vm/ioremap_prot/arch-support.txt
       4 time/arch-tick-broadcast/arch-support.txt
       4 perf/perf-stackdump/arch-support.txt
       4 perf/perf-regs/arch-support.txt
       3 debug/KASAN/arch-support.txt
       2 vm/PG_uncached/arch-support.txt
       2 vm/huge-vmap/arch-support.txt
       2 sched/numa-balancing/arch-support.txt
       2 sched/membarrier-sync-core/arch-support.txt
       2 locking/cmpxchg-local/arch-support.txt
       2 debug/optprobes/arch-support.txt
       2 debug/kprobes-on-ftrace/arch-support.txt
       1 vm/TLB/arch-support.txt
       1 locking/queued-spinlocks/arch-support.txt
       1 locking/queued-rwlocks/arch-support.txt
       1 debug/user-ret-profiler/arch-support.txt
       0 lib/strncasecmp/arch-support.txt
      
      Note that the list does not include riscv or nds32 yet, these still
      need to be added.
      
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      1ea5afd4
  5. Mar 09, 2018
  6. Feb 22, 2018
  7. Feb 11, 2018
  8. Feb 10, 2018
    • Mathieu Desnoyers's avatar
      membarrier-sync-core: Document architecture support · 6a546c7e
      Mathieu Desnoyers authored
      
      Ensure we gather architecture requirements about each architecture
      supporting the "sync_core" membarrier command in a single file under
      Documentation/features.
      
      Signed-off-by: default avatarMathieu Desnoyers <mathieu.desnoyers@efficios.com>
      Cc: Andrea Parri <parri.andrea@gmail.com>
      Cc: Andrew Hunter <ahh@google.com>
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: Avi Kivity <avi@scylladb.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Boqun Feng <boqun.feng@gmail.com>
      Cc: Dave Watson <davejwatson@fb.com>
      Cc: David Sehr <sehr@google.com>
      Cc: Greg Hackmann <ghackmann@google.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Maged Michael <maged.michael@gmail.com>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra (Intel) <peterz@infradead.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Russell King <linux@armlinux.org.uk>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: linux-api@vger.kernel.org
      Cc: linux-arch@vger.kernel.org
      Link: http://lkml.kernel.org/r/1518208256-22034-1-git-send-email-mathieu.desnoyers@efficios.com
      
      
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      6a546c7e
  9. Dec 17, 2017
    • Max Filippov's avatar
      xtensa: add support for KASAN · c633544a
      Max Filippov authored
      
      Cover kernel addresses above 0x90000000 by the shadow map. Enable
      HAVE_ARCH_KASAN when MMU is enabled. Provide kasan_early_init that fills
      shadow map with writable copies of kasan_zero_page. Call
      kasan_early_init right after mmu initialization in the setup_arch.
      Provide kasan_init that allocates proper shadow map pages from the
      memblock and puts these pages into the shadow map for addresses from
      VMALLOC area to the end of KSEG. Call kasan_init right after memblock
      initialization. Don't use KASAN for the boot code, MMU and KASAN
      initialization and page fault handler. Make kernel stack size 4 times
      larger when KASAN is enabled to avoid stack overflows.
      GCC 7.3, 8 or newer is required to build the xtensa kernel with KASAN.
      
      Signed-off-by: default avatarMax Filippov <jcmvbkbc@gmail.com>
      c633544a
    • Max Filippov's avatar
      xtensa: enable stack protector · 40d1a07b
      Max Filippov authored
      
      The implementation is adopted from the ARM arch. GCC 7.3, 8 or newer is
      required for building the xtensa kernel with SSP.
      
      Signed-off-by: default avatarMax Filippov <jcmvbkbc@gmail.com>
      40d1a07b
  10. Oct 03, 2017
  11. Aug 07, 2017
  12. May 01, 2017
  13. Apr 24, 2017
  14. Dec 19, 2016
  15. Dec 15, 2016
  16. Oct 13, 2016
  17. May 11, 2016
  18. Feb 18, 2016
  19. Jan 26, 2016
  20. Jan 21, 2016
    • Christoph Hellwig's avatar
      dma-mapping: always provide the dma_map_ops based implementation · e1c7e324
      Christoph Hellwig authored
      
      Move the generic implementation to <linux/dma-mapping.h> now that all
      architectures support it and remove the HAVE_DMA_ATTR Kconfig symbol now
      that everyone supports them.
      
      [valentinrothberg@gmail.com: remove leftovers in Kconfig]
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Aurelien Jacquiot <a-jacquiot@ti.com>
      Cc: Chris Metcalf <cmetcalf@ezchip.com>
      Cc: David Howells <dhowells@redhat.com>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Haavard Skinnemoen <hskinnemoen@gmail.com>
      Cc: Hans-Christian Egtvedt <egtvedt@samfundet.no>
      Cc: Helge Deller <deller@gmx.de>
      Cc: James Hogan <james.hogan@imgtec.com>
      Cc: Jesper Nilsson <jesper.nilsson@axis.com>
      Cc: Koichi Yasutake <yasutake.koichi@jp.panasonic.com>
      Cc: Ley Foon Tan <lftan@altera.com>
      Cc: Mark Salter <msalter@redhat.com>
      Cc: Mikael Starvik <starvik@axis.com>
      Cc: Steven Miao <realmz6@gmail.com>
      Cc: Vineet Gupta <vgupta@synopsys.com>
      Cc: Christian Borntraeger <borntraeger@de.ibm.com>
      Cc: Joerg Roedel <jroedel@suse.de>
      Cc: Sebastian Ott <sebott@linux.vnet.ibm.com>
      Signed-off-by: default avatarValentin Rothberg <valentinrothberg@gmail.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      e1c7e324
  21. Jan 16, 2016
  22. Jan 10, 2016
    • Mickaël Salaün's avatar
      um: Add seccomp support · c50b4659
      Mickaël Salaün authored
      This brings SECCOMP_MODE_STRICT and SECCOMP_MODE_FILTER support through
      prctl(2) and seccomp(2) to User-mode Linux for i386 and x86_64
      subarchitectures.
      
      secure_computing() is called first in handle_syscall() so that the
      syscall emulation will be aborted quickly if matching a seccomp rule.
      
      This is inspired from Meredydd Luff's patch
      (https://gerrit.chromium.org/gerrit/21425
      
      ).
      
      Signed-off-by: default avatarMickaël Salaün <mic@digikod.net>
      Cc: Jeff Dike <jdike@addtoit.com>
      Cc: Richard Weinberger <richard@nod.at>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Kees Cook <keescook@chromium.org>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Will Drewry <wad@chromium.org>
      Cc: Chris Metcalf <cmetcalf@ezchip.com>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: James Hogan <james.hogan@imgtec.com>
      Cc: Meredydd Luff <meredydd@senatehouse.org>
      Cc: David Drysdale <drysdale@google.com>
      Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
      Acked-by: default avatarKees Cook <keescook@chromium.org>
      c50b4659
  23. Dec 03, 2015
  24. Oct 17, 2015
  25. Oct 12, 2015
  26. Oct 09, 2015
  27. Sep 07, 2015
  28. Sep 04, 2015
  29. Sep 03, 2015
  30. Jul 30, 2015
  31. Jun 03, 2015
    • Ingo Molnar's avatar
      Documentation/features: Explain kernel feature descriptions and add visualization script · 669f6f96
      Ingo Molnar authored
      
      The previous patches added arch support matrices for more than 40 generic kernel features
      that need per architecture support.
      
      The structure of the feature descriptions is the following:
      
      Each feature has its own directory under Documentation/features/subsystem_name/feature_name/,
      and the arch-support.txt file shows its current arch porting status.
      
      For example, lockdep support is shown the following way:
      
          triton:~/tip> cat Documentation/features/locking/lockdep/arch-support.txt
          #
          # Feature name:          lockdep
          #         Kconfig:       LOCKDEP_SUPPORT
          #         description:   arch supports the runtime locking correctness debug facility
          #
              -----------------------
              |         arch |status|
              -----------------------
              |       alpha: | TODO |
              |         arc: |  ok  |
              |         arm: |  ok  |
              |       arm64: |  ok  |
              |       avr32: |  ok  |
              |    blackfin: |  ok  |
              |         c6x: | TODO |
              |        cris: | TODO |
              |         frv: | TODO |
              |       h8300: | TODO |
              |     hexagon: |  ok  |
              |        ia64: | TODO |
              |        m32r: | TODO |
              |        m68k: | TODO |
              |       metag: |  ok  |
              |  microblaze: |  ok  |
              |        mips: |  ok  |
              |     mn10300: | TODO |
              |       nios2: | TODO |
              |    openrisc: | TODO |
              |      parisc: | TODO |
              |     powerpc: |  ok  |
              |        s390: |  ok  |
              |       score: |  ok  |
              |          sh: |  ok  |
              |       sparc: |  ok  |
              |        tile: |  ok  |
              |          um: |  ok  |
              |   unicore32: |  ok  |
              |         x86: |  ok  |
              |      xtensa: |  ok  |
              -----------------------
      
      For generic kernel features that need architecture support, the
      arch-support.txt file in each feature directory shows the arch
      support matrix, for all upstream Linux architectures.
      
      The meaning of entries in the tables is:
      
          | ok |  # feature supported by the architecture
          |TODO|  # feature not yet supported by the architecture
          | .. |  # feature cannot be supported by the hardware
      
      This directory structure can be used in the future to add other
      files - such as porting guides, testing description, etc.
      
      The Documentation/features/ hierarchy may also include generic
      kernel features that works on every architecture, in that case
      the arch-support.txt file will list every architecture as
      supported.
      
      To list an architecture's unsupported features, just do something
      like:
      
        triton:~/tip>  git grep -lE 'x86.*TODO' Documentation/features/*/*/arch-support.txt
        Documentation/features/lib/strncasecmp/arch-support.txt
        Documentation/features/time/arch-tick-broadcast/arch-support.txt
      
      which will print the list of not yet supported features.
      
      The Documentation/features/list-arch.sh script will print the current
      support matrix of one architecture:
      
        triton:~/tip> Documentation/features/list-arch.sh
        #
        # Kernel feature support matrix of the 'x86' architecture:
        #
            core/ BPF-JIT              :  ok  |                        HAVE_BPF_JIT #  arch supports BPF JIT optimizations
            core/ generic-idle-thread  :  ok  |             GENERIC_SMP_IDLE_THREAD #  arch makes use of the generic SMP idle thread facility
            core/ jump-labels          :  ok  |                HAVE_ARCH_JUMP_LABEL #  arch supports live patched, high efficiency branches
            core/ tracehook            :  ok  |                 HAVE_ARCH_TRACEHOOK #  arch supports tracehook (ptrace) register handling APIs
           debug/ gcov-profile-all     :  ok  |           ARCH_HAS_GCOV_PROFILE_ALL #  arch supports whole-kernel GCOV code coverage profiling
           debug/ KASAN                :  ok  |                     HAVE_ARCH_KASAN #  arch supports the KASAN runtime memory checker
           debug/ kgdb                 :  ok  |                      HAVE_ARCH_KGDB #  arch supports the kGDB kernel debugger
           debug/ kprobes              :  ok  |                        HAVE_KPROBES #  arch supports live patched kernel probe
           debug/ kprobes-on-ftrace    :  ok  |              HAVE_KPROBES_ON_FTRACE #  arch supports combined kprobes and ftrace live patching
           debug/ kretprobes           :  ok  |                     HAVE_KRETPROBES #  arch supports kernel function-return probes
           debug/ optprobes            :  ok  |                      HAVE_OPTPROBES #  arch supports live patched optprobes
           debug/ stackprotector       :  ok  |              HAVE_CC_STACKPROTECTOR #  arch supports compiler driven stack overflow protection
           debug/ uprobes              :  ok  |               ARCH_SUPPORTS_UPROBES #  arch supports live patched user probes
           debug/ user-ret-profiler    :  ok  |           HAVE_USER_RETURN_NOTIFIER #  arch supports user-space return from system call profiler
              io/ dma-api-debug        :  ok  |                  HAVE_DMA_API_DEBUG #  arch supports DMA debug facilities
              io/ dma-contiguous       :  ok  |                 HAVE_DMA_CONTIGUOUS #  arch supports the DMA CMA (continuous memory allocator)
              io/ dma_map_attrs        :  ok  |                      HAVE_DMA_ATTRS #  arch provides dma_*map*_attrs() APIs
              io/ sg-chain             :  ok  |                   ARCH_HAS_SG_CHAIN #  arch supports chained scatter-gather lists
             lib/ strncasecmp          : TODO |             __HAVE_ARCH_STRNCASECMP #  arch provides an optimized strncasecmp() function
         locking/ cmpxchg-local        :  ok  |                  HAVE_CMPXCHG_LOCAL #  arch supports the this_cpu_cmpxchg() API
         locking/ lockdep              :  ok  |                     LOCKDEP_SUPPORT #  arch supports the runtime locking correctness debug facility
         locking/ queued-rwlocks       :  ok  |             ARCH_USE_QUEUED_RWLOCKS #  arch supports queued rwlocks
         locking/ queued-spinlocks     :  ok  |           ARCH_USE_QUEUED_SPINLOCKS #  arch supports queued spinlocks
         locking/ rwsem-optimized      :  ok  |               Optimized asm/rwsem.h #  arch provides optimized rwsem APIs
            perf/ kprobes-event        :  ok  |      HAVE_REGS_AND_STACK_ACCESS_API #  arch supports kprobes with perf events
            perf/ perf-regs            :  ok  |                      HAVE_PERF_REGS #  arch supports perf events register access
            perf/ perf-stackdump       :  ok  |           HAVE_PERF_USER_STACK_DUMP #  arch supports perf events stack dumps
           sched/ numa-balancing       :  ok  |        ARCH_SUPPORTS_NUMA_BALANCING #  arch supports NUMA balancing
         seccomp/ seccomp-filter       :  ok  |            HAVE_ARCH_SECCOMP_FILTER #  arch supports seccomp filters
            time/ arch-tick-broadcast  : TODO |             ARCH_HAS_TICK_BROADCAST #  arch provides tick_broadcast()
            time/ clockevents          :  ok  |                 GENERIC_CLOCKEVENTS #  arch support generic clock events
            time/ context-tracking     :  ok  |               HAVE_CONTEXT_TRACKING #  arch supports context tracking for NO_HZ_FULL
            time/ irq-time-acct        :  ok  |            HAVE_IRQ_TIME_ACCOUNTING #  arch supports precise IRQ time accounting
            time/ modern-timekeeping   :  ok  |            !ARCH_USES_GETTIMEOFFSET #  arch does not use arch_gettimeoffset() anymore
            time/ virt-cpuacct         :  ok  |            HAVE_VIRT_CPU_ACCOUNTING #  arch supports precise virtual CPU time accounting
              vm/ ELF-ASLR             :  ok  |              ARCH_HAS_ELF_RANDOMIZE #  arch randomizes the stack, heap and binary images of ELF binaries
              vm/ huge-vmap            :  ok  |                 HAVE_ARCH_HUGE_VMAP #  arch supports the ioremap_pud_enabled() and ioremap_pmd_enabled() VM APIs
              vm/ ioremap_prot         :  ok  |                   HAVE_IOREMAP_PROT #  arch has ioremap_prot()
              vm/ numa-memblock        :  ok  |              HAVE_MEMBLOCK_NODE_MAP #  arch supports NUMA aware memblocks
              vm/ PG_uncached          :  ok  |               ARCH_USES_PG_UNCACHED #  arch supports the PG_uncached page flag
              vm/ pmdp_splitting_flush :  ok  |    __HAVE_ARCH_PMDP_SPLITTING_FLUSH #  arch supports the pmdp_splitting_flush() VM API
              vm/ pte_special          :  ok  |             __HAVE_ARCH_PTE_SPECIAL #  arch supports the pte_special()/pte_mkspecial() VM APIs
              vm/ THP                  :  ok  |      HAVE_ARCH_TRANSPARENT_HUGEPAGE #  arch supports transparent hugepages
      
      Cc: <linux-api@vger.kernel.org>
      Cc: <linux-arch@vger.kernel.org>
      Cc: <linux-kernel@vger.kernel.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Jonathan Corbet <corbet@lwn.net>
      Cc: Josh Triplett <josh@joshtriplett.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      669f6f96
    • Ingo Molnar's avatar
      Documentation/features/core: Add feature description and arch support status file for 'BPF-JIT' · b07b6ecc
      Ingo Molnar authored
      
      Cc: <linux-api@vger.kernel.org>
      Cc: <linux-arch@vger.kernel.org>
      Cc: <linux-kernel@vger.kernel.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Jonathan Corbet <corbet@lwn.net>
      Cc: Josh Triplett <josh@joshtriplett.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      b07b6ecc
Loading