1. 19 7月, 2018 1 次提交
  2. 13 7月, 2018 1 次提交
  3. 12 6月, 2018 1 次提交
  4. 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
  5. 30 5月, 2018 2 次提交
    • H
      s390/archrandom: Rework arch random implementation. · 966f53e7
      Harald Freudenberger 提交于
      The arch_get_random_seed_long() invocation done by the random device
      driver is done in interrupt context and may be invoked very very
      frequently. The existing s390 arch_get_random_seed*() implementation
      uses the PRNO(TRNG) instruction which produces excellent high quality
      entropy but is relatively slow and thus expensive.
      
      This fix reworks the arch_get_random_seed* implementation. It
      introduces a buffer concept to decouple the delivery of random data
      via arch_get_random_seed*() from the generation of new random
      bytes. The buffer of random data is filled asynchronously by a
      workqueue thread.
      If there are enough bytes in the buffer the s390_arch_random_generate()
      just delivers these bytes. Otherwise false is returned until the worker
      thread refills the buffer.
      The worker fills the rng buffer by pulling fresh entropy from the
      high quality (but slow) true hardware random generator. This entropy
      is then spread over the buffer with an pseudo random generator.
      As the arch_get_random_seed_long() fetches 8 bytes and the calling
      function add_interrupt_randomness() counts this as 1 bit entropy the
      distribution needs to make sure there is in fact 1 bit entropy
      contained in 8 bytes of the buffer. The current values pull 32 byte
      entropy and scatter this into a 2048 byte buffer. So 8 byte in the
      buffer will contain 1 bit of entropy.
      The worker thread is rescheduled based on the charge level of the
      buffer but at least with 500 ms delay to avoid too much cpu consumption.
      So the max. amount of rng data delivered via arch_get_random_seed is
      limited to 4Kb per second.
      Signed-off-by: NHarald Freudenberger <freude@de.ibm.com>
      Reviewed-by: NPatrick Steuer <patrick.steuer@de.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      966f53e7
    • U
      s390/net: add pnetid support · b6ef86e9
      Ursula Braun 提交于
      s390 hardware supports the definition of a so-call Physical NETwork
      IDentifier (short PNETID) per network device port. These PNETIDS
      can be used to identify network devices that are attached to the same
      physical network (broadcast domain).
      
      This patch provides the interface to extract the PNETID of a port of
      a device attached to the ccw-bus or pci-bus.
      
      Parts of this patch are based on an initial implementation by
      Thomas Richter.
      Signed-off-by: NUrsula Braun <ubraun@linux.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      b6ef86e9
  6. 25 5月, 2018 2 次提交
    • H
      s390/archrandom: Rework arch random implementation. · 3376d980
      Harald Freudenberger 提交于
      The arch_get_random_seed_long() invocation done by the random device
      driver is done in interrupt context and may be invoked very very
      frequently. The existing s390 arch_get_random_seed*() implementation
      uses the PRNO(TRNG) instruction which produces excellent high quality
      entropy but is relatively slow and thus expensive.
      
      This fix reworks the arch_get_random_seed* implementation. It
      introduces a buffer concept to decouple the delivery of random data
      via arch_get_random_seed*() from the generation of new random
      bytes. The buffer of random data is filled asynchronously by a
      workqueue thread.
      If there are enough bytes in the buffer the s390_arch_random_generate()
      just delivers these bytes. Otherwise false is returned until the worker
      thread refills the buffer.
      The worker fills the rng buffer by pulling fresh entropy from the
      high quality (but slow) true hardware random generator. This entropy
      is then spread over the buffer with an pseudo random generator.
      As the arch_get_random_seed_long() fetches 8 bytes and the calling
      function add_interrupt_randomness() counts this as 1 bit entropy the
      distribution needs to make sure there is in fact 1 bit entropy
      contained in 8 bytes of the buffer. The current values pull 32 byte
      entropy and scatter this into a 2048 byte buffer. So 8 byte in the
      buffer will contain 1 bit of entropy.
      The worker thread is rescheduled based on the charge level of the
      buffer but at least with 500 ms delay to avoid too much cpu consumption.
      So the max. amount of rng data delivered via arch_get_random_seed is
      limited to 4Kb per second.
      Signed-off-by: NHarald Freudenberger <freude@de.ibm.com>
      Reviewed-by: NPatrick Steuer <patrick.steuer@de.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      3376d980
    • U
      s390/net: add pnetid support · 866f4c8e
      Ursula Braun 提交于
      s390 hardware supports the definition of a so-call Physical NETwork
      IDentifier (short PNETID) per network device port. These PNETIDS
      can be used to identify network devices that are attached to the same
      physical network (broadcast domain).
      
      This patch provides the interface to extract the PNETID of a port of
      a device attached to the ccw-bus or pci-bus.
      
      Parts of this patch are based on an initial implementation by
      Thomas Richter.
      Signed-off-by: NUrsula Braun <ubraun@linux.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      866f4c8e
  7. 23 5月, 2018 2 次提交
  8. 17 5月, 2018 2 次提交
  9. 14 5月, 2018 1 次提交
  10. 09 5月, 2018 2 次提交
  11. 08 5月, 2018 2 次提交
    • M
      s390: extend expoline to BC instructions · 6deaa3bb
      Martin Schwidefsky 提交于
      The BPF JIT uses a 'b <disp>(%r<x>)' instruction in the definition
      of the sk_load_word and sk_load_half functions.
      
      Add support for branch-on-condition instructions contained in the
      thunk code of an expoline.
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      6deaa3bb
    • M
      s390/ftrace: use expoline for indirect branches · 23a4d7fd
      Martin Schwidefsky 提交于
      The return from the ftrace_stub, _mcount, ftrace_caller and
      return_to_handler functions is done with "br %r14" and "br %r1".
      These are indirect branches as well and need to use execute
      trampolines for CONFIG_EXPOLINE=y.
      
      The ftrace_caller function is a special case as it returns to the
      start of a function and may only use %r0 and %r1. For a pre z10
      machine the standard execute trampoline uses a LARL + EX to do
      this, but this requires *two* registers in the range %r1..%r15.
      To get around this the 'br %r1' located in the lowcore is used,
      then the EX instruction does not need an address register.
      But the lowcore trick may only be used for pre z14 machines,
      with noexec=on the mapping for the first page may not contain
      instructions. The solution for that is an ALTERNATIVE in the
      expoline THUNK generated by 'GEN_BR_THUNK %r1' to switch to
      EXRL, this relies on the fact that a machine that supports
      noexec=on has EXRL as well.
      
      Cc: stable@vger.kernel.org # 4.16
      Fixes: f19fbd5e ("s390: introduce execute-trampolines for branches")
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      23a4d7fd
  12. 07 5月, 2018 2 次提交
  13. 27 4月, 2018 1 次提交
  14. 23 4月, 2018 1 次提交
    • M
      s390: update sampling tag after task pid change · 2317b07d
      Martin Schwidefsky 提交于
      In a multi-threaded program any thread can call execve(). If this
      is not done by the thread group leader, the de_thread() function
      replaces the pid of the task that calls execve() with the pid of
      thread group leader. If the task reaches user space again without
      going over __switch_to() the sampling tag is still set to the old
      pid.
      
      Define the arch_setup_new_exec function to verify the task pid
      and udpate the tag with LPP if it has changed.
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      2317b07d
  15. 20 4月, 2018 1 次提交
    • A
      y2038: s390: Remove unneeded ipc uapi header files · 26293b31
      Arnd Bergmann 提交于
      The s390 msgbuf/sembuf/shmbuf header files are all identical to the
      version from asm-generic.
      
      This patch removes the files and replaces them with 'generic-y'
      statements, to avoid having to modify each copy when we extend sysvipc
      to deal with 64-bit time_t in 32-bit user space.
      
      Note that unlike alpha and ia64, the ipcbuf.h header file is slightly
      different here, so I'm leaving the private copy.
      
      To deal with 32-bit compat tasks, we also have to adapt the definitions
      of compat_{shm,sem,msg}id_ds to match the changes to the respective
      asm-generic files.
      Acked-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      26293b31
  16. 19 4月, 2018 1 次提交
    • D
      compat: Move compat_timespec/ timeval to compat_time.h · 0d55303c
      Deepa Dinamani 提交于
      All the current architecture specific defines for these
      are the same. Refactor these common defines to a common
      header file.
      
      The new common linux/compat_time.h is also useful as it
      will eventually be used to hold all the defines that
      are needed for compat time types that support non y2038
      safe types. New architectures need not have to define these
      new types as they will only use new y2038 safe syscalls.
      This file can be deleted after y2038 when we stop supporting
      non y2038 safe syscalls.
      
      The patch also requires an operation similar to:
      
      git grep "asm/compat\.h" | cut -d ":" -f 1 |  xargs -n 1 sed -i -e "s%asm/compat.h%linux/compat.h%g"
      
      Cc: acme@kernel.org
      Cc: benh@kernel.crashing.org
      Cc: borntraeger@de.ibm.com
      Cc: catalin.marinas@arm.com
      Cc: cmetcalf@mellanox.com
      Cc: cohuck@redhat.com
      Cc: davem@davemloft.net
      Cc: deller@gmx.de
      Cc: devel@driverdev.osuosl.org
      Cc: gerald.schaefer@de.ibm.com
      Cc: gregkh@linuxfoundation.org
      Cc: heiko.carstens@de.ibm.com
      Cc: hoeppner@linux.vnet.ibm.com
      Cc: hpa@zytor.com
      Cc: jejb@parisc-linux.org
      Cc: jwi@linux.vnet.ibm.com
      Cc: linux-kernel@vger.kernel.org
      Cc: linux-mips@linux-mips.org
      Cc: linux-parisc@vger.kernel.org
      Cc: linuxppc-dev@lists.ozlabs.org
      Cc: linux-s390@vger.kernel.org
      Cc: mark.rutland@arm.com
      Cc: mingo@redhat.com
      Cc: mpe@ellerman.id.au
      Cc: oberpar@linux.vnet.ibm.com
      Cc: oprofile-list@lists.sf.net
      Cc: paulus@samba.org
      Cc: peterz@infradead.org
      Cc: ralf@linux-mips.org
      Cc: rostedt@goodmis.org
      Cc: rric@kernel.org
      Cc: schwidefsky@de.ibm.com
      Cc: sebott@linux.vnet.ibm.com
      Cc: sparclinux@vger.kernel.org
      Cc: sth@linux.vnet.ibm.com
      Cc: ubraun@linux.vnet.ibm.com
      Cc: will.deacon@arm.com
      Cc: x86@kernel.org
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NDeepa Dinamani <deepa.kernel@gmail.com>
      Acked-by: NSteven Rostedt (VMware) <rostedt@goodmis.org>
      Acked-by: NCatalin Marinas <catalin.marinas@arm.com>
      Acked-by: NJames Hogan <jhogan@kernel.org>
      Acked-by: NHelge Deller <deller@gmx.de>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      0d55303c
  17. 16 4月, 2018 4 次提交
  18. 11 4月, 2018 2 次提交
    • M
      s390: correct nospec auto detection init order · 6a3d1e81
      Martin Schwidefsky 提交于
      With CONFIG_EXPOLINE_AUTO=y the call of spectre_v2_auto_early() via
      early_initcall is done *after* the early_param functions. This
      overwrites any settings done with the nobp/no_spectre_v2/spectre_v2
      parameters. The code patching for the kernel is done after the
      evaluation of the early parameters but before the early_initcall
      is done. The end result is a kernel image that is patched correctly
      but the kernel modules are not.
      
      Make sure that the nospec auto detection function is called before the
      early parameters are evaluated and before the code patching is done.
      
      Fixes: 6e179d64 ("s390: add automatic detection of the spectre defense")
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      6a3d1e81
    • H
      s390/zcrypt: Support up to 256 crypto adapters. · af4a7227
      Harald Freudenberger 提交于
      There was an artificial restriction on the card/adapter id
      to only 6 bits but all the AP commands do support adapter
      ids with 8 bit. This patch removes this restriction to 64
      adapters and now up to 256 adapter can get addressed.
      
      Some of the ioctl calls work on the max number of cards
      possible (which was 64). These ioctls are now deprecated
      but still supported. All the defines, structs and ioctl
      interface declarations have been kept for compabibility.
      There are now new ioctls (and defines for these) with an
      additional '2' appended which provide the extended versions
      with 256 cards supported.
      Signed-off-by: NHarald Freudenberger <freude@linux.vnet.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      af4a7227
  19. 10 4月, 2018 6 次提交
  20. 28 3月, 2018 3 次提交
  21. 26 3月, 2018 2 次提交