1. 10 1月, 2018 2 次提交
  2. 05 12月, 2017 1 次提交
    • H
      bpf: correct broken uapi for BPF_PROG_TYPE_PERF_EVENT program type · c895f6f7
      Hendrik Brueckner 提交于
      Commit 0515e599 ("bpf: introduce BPF_PROG_TYPE_PERF_EVENT
      program type") introduced the bpf_perf_event_data structure which
      exports the pt_regs structure.  This is OK for multiple architectures
      but fail for s390 and arm64 which do not export pt_regs.  Programs
      using them, for example, the bpf selftest fail to compile on these
      architectures.
      
      For s390, exporting the pt_regs is not an option because s390 wants
      to allow changes to it.  For arm64, there is a user_pt_regs structure
      that covers parts of the pt_regs structure for use by user space.
      
      To solve the broken uapi for s390 and arm64, introduce an abstract
      type for pt_regs and add an asm/bpf_perf_event.h file that concretes
      the type.  An asm-generic header file covers the architectures that
      export pt_regs today.
      
      The arch-specific enablement for s390 and arm64 follows in separate
      commits.
      Reported-by: NThomas Richter <tmricht@linux.vnet.ibm.com>
      Fixes: 0515e599 ("bpf: introduce BPF_PROG_TYPE_PERF_EVENT program type")
      Signed-off-by: NHendrik Brueckner <brueckner@linux.vnet.ibm.com>
      Reviewed-and-tested-by: NThomas Richter <tmricht@linux.vnet.ibm.com>
      Acked-by: NAlexei Starovoitov <ast@kernel.org>
      Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Daniel Borkmann <daniel@iogearbox.net>
      Signed-off-by: NDaniel Borkmann <daniel@iogearbox.net>
      c895f6f7
  3. 16 11月, 2017 1 次提交
  4. 09 11月, 2017 1 次提交
  5. 03 11月, 2017 14 次提交
    • S
      openrisc: fix possible deadlock scenario during timer sync · 610f01b9
      Stafford Horne 提交于
      OpenRISC borrows its timer sync logic from MIPS, Matt helped to review
      the OpenRISC implementation and noted that we may suffer the same
      deadlock case that MIPS has faced. The case being:
      
        "the MIPS timer synchronization code contained the possibility of
        deadlock. If you mark a CPU online before it goes into the synchronize
        loop, then the boot CPU can schedule a different thread and send IPIs to
        all "online" CPUs. It gets stuck waiting for the secondary to ack it's
        IPI, since this secondary CPU has not enabled IRQs yet, and is stuck
        waiting for the master to synchronise with it.  The system then
        deadlocks."
      
      Fix this by moving set_cpu_online() to after timer sync.
      Reported-by: NMatt Redfearn <matt.redfearn@mips.com>
      Signed-off-by: NStafford Horne <shorne@gmail.com>
      610f01b9
    • L
      openrisc: pass endianness info to sparse · afa83808
      Luc Van Oostenryck 提交于
      openrisc is big-endian only but sparse assumes the same endianness
      as the building machine.
      This is problematic for code which expect __BYTE_ORDER__ being
      correctly predefined by the compiler which sparse can then
      pre-process differently from what gcc would, depending on the
      building machine endianness.
      
      Fix this by letting sparse know about the architecture endianness.
      
      To: Jonas Bonn <jonas@southpole.se>
      To: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
      To: Stafford Horne <shorne@gmail.com>
      Signed-off-by: NLuc Van Oostenryck <luc.vanoostenryck@gmail.com>
      Signed-off-by: NStafford Horne <shorne@gmail.com>
      afa83808
    • S
      openrisc: add tick timer multi-core sync logic · 4553474d
      Stafford Horne 提交于
      In case timers are not in sync when cpus start (i.e. hot plug / offset
      resets) we need to synchronize the secondary cpus internal timer with
      the main cpu.  This is needed as in OpenRISC SMP there is only one
      clocksource registered which reads from the same ttcr register on each
      cpu.
      
      This synchronization routine heavily borrows from mips implementation that
      does something similar.
      Signed-off-by: NStafford Horne <shorne@gmail.com>
      4553474d
    • S
      openrisc: enable LOCKDEP_SUPPORT and irqflags tracing · 78cdfb5c
      Stafford Horne 提交于
      Lockdep is needed for proving the spinlocks and rwlocks work fine on our
      platform.  It also requires calling the trace_hardirqs_off() and
      trace_hardirqs_on() pair of routines when entering and exiting an
      interrupt.
      
      For OpenRISC the interrupt stack frame does not support frame pointers,
      so to call trace_hardirqs_on() and trace_hardirqs_off() here the macro's
      build up a stack frame each time.
      
      There is one necessary small change in _sys_call_handler to move
      interrupt enabling later so they can get re-enabled during syscall
      restart. This was done to fix lockdep warnings that are now possible due
      to this
      patch.
      Signed-off-by: NStafford Horne <shorne@gmail.com>
      78cdfb5c
    • S
      openrisc: support framepointers and STACKTRACE_SUPPORT · eecac38b
      Stafford Horne 提交于
      For lockdep support a reliable stack trace mechanism is needed.  This
      patch adds support in OpenRISC for the stacktrace framework, implemented
      by a simple unwinder api.  The unwinder api supports both framepointer
      and basic stack tracing.
      
      The unwinder is now used to replace the stack_dump() implementation as
      well. The new traces are inline with other architectures trace format:
      
       Call trace:
       [<c0004448>] show_stack+0x3c/0x58
       [<c031c940>] dump_stack+0xa8/0xe4
       [<c0008104>] __cpu_up+0x64/0x130
       [<c000d268>] bringup_cpu+0x3c/0x178
       [<c000d038>] cpuhp_invoke_callback+0xa8/0x1fc
       [<c000d680>] cpuhp_up_callbacks+0x44/0x14c
       [<c000e400>] cpu_up+0x14c/0x1bc
       [<c041da60>] smp_init+0x104/0x15c
       [<c033843c>] ? kernel_init+0x0/0x140
       [<c0415e04>] kernel_init_freeable+0xbc/0x25c
       [<c033843c>] ? kernel_init+0x0/0x140
       [<c0338458>] kernel_init+0x1c/0x140
       [<c003a174>] ? schedule_tail+0x18/0xa0
       [<c0006b80>] ret_from_fork+0x1c/0x9c
      Signed-off-by: NStafford Horne <shorne@gmail.com>
      eecac38b
    • S
      openrisc: add simple_smp dts and defconfig for simulators · 306e5e50
      Stefan Kristiansson 提交于
      Simple enough to be compatible with simulation environments,
      such as verilated systems, QEMU and other targets supporting OpenRISC
      SMP.  This also supports our base FPGA SoC's if the cpu frequency is
      upped to 50Mhz.
      Signed-off-by: NStefan Kristiansson <stefan.kristiansson@saunalahti.fi>
      [shorne@gmail.com: Added defconfig]
      Signed-off-by: NStafford Horne <shorne@gmail.com>
      306e5e50
    • J
      openrisc: add cacheflush support to fix icache aliasing · 4ee93d80
      Jan Henrik Weinstock 提交于
      On OpenRISC the icache does not snoop data stores.  This can cause
      aliasing as reported by Jan. This patch fixes the issue to ensure icache
      is properly synchronized when code is written to memory.  It supports both
      SMP and UP flushing.
      
      This supports dcache flush as well for architectures that do not support
      write-through caches; most OpenRISC implementations do implement
      write-through cache however. Dcache flushes are done only on a single
      core as OpenRISC dcaches all support snooping of bus stores.
      Signed-off-by: NJan Henrik Weinstock <jan.weinstock@ice.rwth-aachen.de>
      [shorne@gmail.com: Squashed patches and wrote commit message]
      Signed-off-by: NStafford Horne <shorne@gmail.com>
      4ee93d80
    • S
      openrisc: sleep instead of spin on secondary wait · c0567184
      Stafford Horne 提交于
      Currently we do a spin on secondary cpus when waiting to boot.  This
      theoretically causes issues with power consumption and does cause issues
      with qemu cycle burning (it starves cpu 0 from actually being able to
      boot.)
      
      This change puts each secondary cpu to sleep if they have a power
      management unit, then signals them to wake via IPI when its time to boot.
      If the cpus have no power management unit they will loop as before.
      
      Note: The wakeup IPI requires a special interrupt handler as on secondary
      cpu's the interrupt infrastructure is not yet established.  This
      interrupt handler is set and reset by updating SPR_EVBAR.
      Signed-off-by: NStafford Horne <shorne@gmail.com>
      c0567184
    • S
      openrisc: fix initial preempt state for secondary cpu tasks · b441aab7
      Stafford Horne 提交于
      During SMP testing we were getting the below warning after booting the
      secondary cpu:
      
      [    0.060000] BUG: scheduling while atomic: swapper/1/0/0x00000000
      
      This change follows similar patterns from other architectures to start
      the schduler with preempt disabled.
      Signed-off-by: NStafford Horne <shorne@gmail.com>
      b441aab7
    • S
      openrisc: initial SMP support · 8e6d08e0
      Stefan Kristiansson 提交于
      This patch introduces the SMP support for the OpenRISC architecture.
      The SMP architecture requires cores which have multi-core features which
      have been introduced a few years back including:
      
       - New SPRS SPR_COREID SPR_NUMCORES
       - Shadow SPRs
       - Atomic Instructions
       - Cache Coherency
       - A wired in IPI controller
      
      This patch adds all of the SMP specific changes to core infrastructure,
      it looks big but it needs to go all together as its hard to split this
      one up.
      
      Boot loader spinning of second cpu is not supported yet, it's assumed
      that Linux is booted straight after cpu reset.
      
      The bulk of these changes are trivial changes to refactor to use per cpu
      data structures throughout.  The addition of the smp.c and changes in
      time.c are the changes.  Some specific notes:
      
      MM changes
      ----------
      The reason why this is created as an array, and not with DEFINE_PER_CPU
      is that doing it this way, we'll save a load in the tlb-miss handler
      (the load from __per_cpu_offset).
      
      TLB Flush
      ---------
      The SMP implementation of flush_tlb_* works by sending out a
      function-call IPI to all the non-local cpus by using the generic
      on_each_cpu() function.
      
      Currently, all flush_tlb_* functions will result in a flush_tlb_all(),
      which has always been the behaviour in the UP case.
      
      CPU INFO
      --------
      This creates a per cpu cpuinfo struct and fills it out accordingly for
      each activated cpu.  show_cpuinfo is also updated to reflect new version
      information in later versions of the spec.
      
      SMP API
      -------
      This imitates the arm64 implementation by having a smp_cross_call
      callback that can be set by set_smp_cross_call to initiate an IPI and a
      handle_IPI function that is expected to be called from an IPI irqchip
      driver.
      Signed-off-by: NStefan Kristiansson <stefan.kristiansson@saunalahti.fi>
      [shorne@gmail.com: added cpu stop, checkpatch fixes, wrote commit message]
      Signed-off-by: NStafford Horne <shorne@gmail.com>
      8e6d08e0
    • S
      irqchip: add initial support for ompic · 9b54470a
      Stafford Horne 提交于
      IPI driver for the Open Multi-Processor Interrupt Controller (ompic) as
      described in the Multi-core support section of the OpenRISC 1.2
      architecture specification:
      
        https://github.com/openrisc/doc/raw/master/openrisc-arch-1.2-rev0.pdf
      
      Each OpenRISC core contains a full interrupt controller which is used in
      the SMP architecture for interrupt balancing.  This IPI device, the
      ompic, is the only external device required for enabling SMP on
      OpenRISC.
      
      Pending ops are stored in a memory bit mask which can allow multiple
      pending operations to be set and serviced at a time. This is mostly
      borrowed from the alpha IPI implementation.
      Reviewed-by: NMarc Zyngier <marc.zyngier@arm.com>
      Acked-by: NRob Herring <robh@kernel.org>
      Signed-off-by: NStefan Kristiansson <stefan.kristiansson@saunalahti.fi>
      [shorne@gmail.com: converted ops to bitmask, wrote commit message]
      Signed-off-by: NStafford Horne <shorne@gmail.com>
      9b54470a
    • S
      openrisc: use qspinlocks and qrwlocks · b5f82176
      Stafford Horne 提交于
      Enable OpenRISC to use qspinlocks and qrwlocks for upcoming SMP support.
      Signed-off-by: NStafford Horne <shorne@gmail.com>
      b5f82176
    • S
      openrisc: add 1 and 2 byte cmpxchg support · 489e0f80
      Stafford Horne 提交于
      OpenRISC only supports hardware instructions that perform 4 byte atomic
      operations.  For enabling qrwlocks for upcoming SMP support 1 and 2 byte
      implementations are needed.  To do this we leverage the 4 byte atomic
      operations and shift/mask the 1 and 2 byte areas as needed.
      
      This heavily borrows ideas and routines from sh and mips, which do
      something similar.
      
      Cc: Peter Zijlstra <peterz@infradead.org>
      Signed-off-by: NStafford Horne <shorne@gmail.com>
      489e0f80
    • S
      openrisc: use shadow registers to save regs on exception · 91993c8c
      Stefan Kristiansson 提交于
      Previously, the area between 0x0-0x100 have been used as a "scratch"
      memory area to temporarily store regs during exception entry. In a
      multi-core environment, this will not work.
      
      This change is to use shadow registers for nested context.
      
      Currently only the "critical" temp load/stores are covered, the
      EMERGENCY_PRINT ones are left as is (when they are used, it's game over
      anyway), they need to be handled as well in the future.
      Signed-off-by: NStefan Kristiansson <stefan.kristiansson@saunalahti.fi>
      Signed-off-by: NStafford Horne <shorne@gmail.com>
      91993c8c
  6. 02 11月, 2017 2 次提交
    • G
      License cleanup: add SPDX license identifier to uapi header files with a license · e2be04c7
      Greg Kroah-Hartman 提交于
      Many user space API headers have licensing information, which is either
      incomplete, badly formatted or just a shorthand for referring to the
      license under which the file is supposed to be.  This makes it hard for
      compliance tools to determine the correct license.
      
      Update these files with an SPDX license identifier.  The identifier was
      chosen based on the license information in the file.
      
      GPL/LGPL licensed headers get the matching GPL/LGPL SPDX license
      identifier with the added 'WITH Linux-syscall-note' exception, which is
      the officially assigned exception identifier for the kernel syscall
      exception:
      
         NOTE! This copyright does *not* cover user programs that use kernel
         services by normal system calls - this is merely considered normal use
         of the kernel, and does *not* fall under the heading of "derived work".
      
      This exception makes it possible to include GPL headers into non GPL
      code, without confusing license compliance tools.
      
      Headers which have either explicit dual licensing or are just licensed
      under a non GPL license are updated with the corresponding SPDX
      identifier and the GPLv2 with syscall exception identifier.  The format
      is:
              ((GPL-2.0 WITH Linux-syscall-note) OR SPDX-ID-OF-OTHER-LICENSE)
      
      SPDX license identifiers are a legally binding shorthand, which can be
      used instead of the full boiler plate text.  The update does not remove
      existing license information as this has to be done on a case by case
      basis and the copyright holders might have to be consulted. This will
      happen in a separate step.
      
      This patch is based on work done by Thomas Gleixner and Kate Stewart and
      Philippe Ombredanne.  See the previous patch in this series for the
      methodology of how this patch was researched.
      Reviewed-by: NKate Stewart <kstewart@linuxfoundation.org>
      Reviewed-by: NPhilippe Ombredanne <pombredanne@nexb.com>
      Reviewed-by: NThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      e2be04c7
    • G
      License cleanup: add SPDX GPL-2.0 license identifier to files with no license · b2441318
      Greg Kroah-Hartman 提交于
      Many source files in the tree are missing licensing information, which
      makes it harder for compliance tools to determine the correct license.
      
      By default all files without license information are under the default
      license of the kernel, which is GPL version 2.
      
      Update the files which contain no license information with the 'GPL-2.0'
      SPDX license identifier.  The SPDX identifier is a legally binding
      shorthand, which can be used instead of the full boiler plate text.
      
      This patch is based on work done by Thomas Gleixner and Kate Stewart and
      Philippe Ombredanne.
      
      How this work was done:
      
      Patches were generated and checked against linux-4.14-rc6 for a subset of
      the use cases:
       - file had no licensing information it it.
       - file was a */uapi/* one with no licensing information in it,
       - file was a */uapi/* one with existing licensing information,
      
      Further patches will be generated in subsequent months to fix up cases
      where non-standard license headers were used, and references to license
      had to be inferred by heuristics based on keywords.
      
      The analysis to determine which SPDX License Identifier to be applied to
      a file was done in a spreadsheet of side by side results from of the
      output of two independent scanners (ScanCode & Windriver) producing SPDX
      tag:value files created by Philippe Ombredanne.  Philippe prepared the
      base worksheet, and did an initial spot review of a few 1000 files.
      
      The 4.13 kernel was the starting point of the analysis with 60,537 files
      assessed.  Kate Stewart did a file by file comparison of the scanner
      results in the spreadsheet to determine which SPDX license identifier(s)
      to be applied to the file. She confirmed any determination that was not
      immediately clear with lawyers working with the Linux Foundation.
      
      Criteria used to select files for SPDX license identifier tagging was:
       - Files considered eligible had to be source code files.
       - Make and config files were included as candidates if they contained >5
         lines of source
       - File already had some variant of a license header in it (even if <5
         lines).
      
      All documentation files were explicitly excluded.
      
      The following heuristics were used to determine which SPDX license
      identifiers to apply.
      
       - when both scanners couldn't find any license traces, file was
         considered to have no license information in it, and the top level
         COPYING file license applied.
      
         For non */uapi/* files that summary was:
      
         SPDX license identifier                            # files
         ---------------------------------------------------|-------
         GPL-2.0                                              11139
      
         and resulted in the first patch in this series.
      
         If that file was a */uapi/* path one, it was "GPL-2.0 WITH
         Linux-syscall-note" otherwise it was "GPL-2.0".  Results of that was:
      
         SPDX license identifier                            # files
         ---------------------------------------------------|-------
         GPL-2.0 WITH Linux-syscall-note                        930
      
         and resulted in the second patch in this series.
      
       - if a file had some form of licensing information in it, and was one
         of the */uapi/* ones, it was denoted with the Linux-syscall-note if
         any GPL family license was found in the file or had no licensing in
         it (per prior point).  Results summary:
      
         SPDX license identifier                            # files
         ---------------------------------------------------|------
         GPL-2.0 WITH Linux-syscall-note                       270
         GPL-2.0+ WITH Linux-syscall-note                      169
         ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause)    21
         ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)    17
         LGPL-2.1+ WITH Linux-syscall-note                      15
         GPL-1.0+ WITH Linux-syscall-note                       14
         ((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause)    5
         LGPL-2.0+ WITH Linux-syscall-note                       4
         LGPL-2.1 WITH Linux-syscall-note                        3
         ((GPL-2.0 WITH Linux-syscall-note) OR MIT)              3
         ((GPL-2.0 WITH Linux-syscall-note) AND MIT)             1
      
         and that resulted in the third patch in this series.
      
       - when the two scanners agreed on the detected license(s), that became
         the concluded license(s).
      
       - when there was disagreement between the two scanners (one detected a
         license but the other didn't, or they both detected different
         licenses) a manual inspection of the file occurred.
      
       - In most cases a manual inspection of the information in the file
         resulted in a clear resolution of the license that should apply (and
         which scanner probably needed to revisit its heuristics).
      
       - When it was not immediately clear, the license identifier was
         confirmed with lawyers working with the Linux Foundation.
      
       - If there was any question as to the appropriate license identifier,
         the file was flagged for further research and to be revisited later
         in time.
      
      In total, over 70 hours of logged manual review was done on the
      spreadsheet to determine the SPDX license identifiers to apply to the
      source files by Kate, Philippe, Thomas and, in some cases, confirmation
      by lawyers working with the Linux Foundation.
      
      Kate also obtained a third independent scan of the 4.13 code base from
      FOSSology, and compared selected files where the other two scanners
      disagreed against that SPDX file, to see if there was new insights.  The
      Windriver scanner is based on an older version of FOSSology in part, so
      they are related.
      
      Thomas did random spot checks in about 500 files from the spreadsheets
      for the uapi headers and agreed with SPDX license identifier in the
      files he inspected. For the non-uapi files Thomas did random spot checks
      in about 15000 files.
      
      In initial set of patches against 4.14-rc6, 3 files were found to have
      copy/paste license identifier errors, and have been fixed to reflect the
      correct identifier.
      
      Additionally Philippe spent 10 hours this week doing a detailed manual
      inspection and review of the 12,461 patched files from the initial patch
      version early this week with:
       - a full scancode scan run, collecting the matched texts, detected
         license ids and scores
       - reviewing anything where there was a license detected (about 500+
         files) to ensure that the applied SPDX license was correct
       - reviewing anything where there was no detection but the patch license
         was not GPL-2.0 WITH Linux-syscall-note to ensure that the applied
         SPDX license was correct
      
      This produced a worksheet with 20 files needing minor correction.  This
      worksheet was then exported into 3 different .csv files for the
      different types of files to be modified.
      
      These .csv files were then reviewed by Greg.  Thomas wrote a script to
      parse the csv files and add the proper SPDX tag to the file, in the
      format that the file expected.  This script was further refined by Greg
      based on the output to detect more types of files automatically and to
      distinguish between header and source .c files (which need different
      comment types.)  Finally Greg ran the script using the .csv files to
      generate the patches.
      Reviewed-by: NKate Stewart <kstewart@linuxfoundation.org>
      Reviewed-by: NPhilippe Ombredanne <pombredanne@nexb.com>
      Reviewed-by: NThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      b2441318
  7. 30 10月, 2017 2 次提交
  8. 11 9月, 2017 1 次提交
  9. 09 9月, 2017 1 次提交
  10. 26 8月, 2017 1 次提交
    • J
      futex: Remove duplicated code and fix undefined behaviour · 30d6e0a4
      Jiri Slaby 提交于
      There is code duplicated over all architecture's headers for
      futex_atomic_op_inuser. Namely op decoding, access_ok check for uaddr,
      and comparison of the result.
      
      Remove this duplication and leave up to the arches only the needed
      assembly which is now in arch_futex_atomic_op_inuser.
      
      This effectively distributes the Will Deacon's arm64 fix for undefined
      behaviour reported by UBSAN to all architectures. The fix was done in
      commit 5f16a046 (arm64: futex: Fix undefined behaviour with
      FUTEX_OP_OPARG_SHIFT usage). Look there for an example dump.
      
      And as suggested by Thomas, check for negative oparg too, because it was
      also reported to cause undefined behaviour report.
      
      Note that s390 removed access_ok check in d12a2970 ("s390/uaccess:
      remove pointless access_ok() checks") as access_ok there returns true.
      We introduce it back to the helper for the sake of simplicity (it gets
      optimized away anyway).
      Signed-off-by: NJiri Slaby <jslaby@suse.cz>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Acked-by: NRussell King <rmk+kernel@armlinux.org.uk>
      Acked-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc)
      Acked-by: Heiko Carstens <heiko.carstens@de.ibm.com> [s390]
      Acked-by: Chris Metcalf <cmetcalf@mellanox.com> [for tile]
      Reviewed-by: NDarren Hart (VMware) <dvhart@infradead.org>
      Reviewed-by: Will Deacon <will.deacon@arm.com> [core/arm64]
      Cc: linux-mips@linux-mips.org
      Cc: Rich Felker <dalias@libc.org>
      Cc: linux-ia64@vger.kernel.org
      Cc: linux-sh@vger.kernel.org
      Cc: peterz@infradead.org
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Max Filippov <jcmvbkbc@gmail.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: sparclinux@vger.kernel.org
      Cc: Jonas Bonn <jonas@southpole.se>
      Cc: linux-s390@vger.kernel.org
      Cc: linux-arch@vger.kernel.org
      Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
      Cc: linux-hexagon@vger.kernel.org
      Cc: Helge Deller <deller@gmx.de>
      Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Matt Turner <mattst88@gmail.com>
      Cc: linux-snps-arc@lists.infradead.org
      Cc: Fenghua Yu <fenghua.yu@intel.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: linux-xtensa@linux-xtensa.org
      Cc: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
      Cc: openrisc@lists.librecores.org
      Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
      Cc: Stafford Horne <shorne@gmail.com>
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: Chris Zankel <chris@zankel.net>
      Cc: Michal Simek <monstr@monstr.eu>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: linux-parisc@vger.kernel.org
      Cc: Vineet Gupta <vgupta@synopsys.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Richard Kuo <rkuo@codeaurora.org>
      Cc: linux-alpha@vger.kernel.org
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: linuxppc-dev@lists.ozlabs.org
      Cc: "David S. Miller" <davem@davemloft.net>
      Link: http://lkml.kernel.org/r/20170824073105.3901-1-jslaby@suse.cz
      30d6e0a4
  11. 11 7月, 2017 1 次提交
  12. 08 7月, 2017 2 次提交
  13. 29 6月, 2017 1 次提交
  14. 28 6月, 2017 1 次提交
  15. 20 6月, 2017 1 次提交
  16. 04 6月, 2017 1 次提交
  17. 30 5月, 2017 1 次提交
    • V
      kthread: fix boot hang (regression) on MIPS/OpenRISC · b0f5a8f3
      Vegard Nossum 提交于
      This fixes a regression in commit 4d6501dc where I didn't notice
      that MIPS and OpenRISC were reinitialising p->{set,clear}_child_tid to
      NULL after our initialisation in copy_process().
      
      We can simply get rid of the arch-specific initialisation here since it
      is now always done in copy_process() before hitting copy_thread{,_tls}().
      
      Review notes:
      
       - As far as I can tell, copy_process() is the only user of
         copy_thread_tls(), which is the only caller of copy_thread() for
         architectures that don't implement copy_thread_tls().
      
       - After this patch, there is no arch-specific code touching
         p->set_child_tid or p->clear_child_tid whatsoever.
      
       - It may look like MIPS/OpenRISC wanted to always have these fields be
         NULL, but that's not true, as copy_process() would unconditionally
         set them again _after_ calling copy_thread_tls() before commit
         4d6501dc.
      
      Fixes: 4d6501dc ("kthread: Fix use-after-free if kthread fork fails")
      Reported-by: NGuenter Roeck <linux@roeck-us.net>
      Tested-by: Guenter Roeck <linux@roeck-us.net> # MIPS only
      Acked-by: NStafford Horne <shorne@gmail.com>
      Acked-by: NOleg Nesterov <oleg@redhat.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: linux-mips@linux-mips.org
      Cc: Jonas Bonn <jonas@southpole.se>
      Cc: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
      Cc: openrisc@lists.librecores.org
      Cc: Jamie Iles <jamie.iles@oracle.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NVegard Nossum <vegard.nossum@oracle.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      b0f5a8f3
  18. 16 5月, 2017 1 次提交
  19. 15 5月, 2017 2 次提交
  20. 10 5月, 2017 1 次提交
    • N
      uapi: export all headers under uapi directories · fcc8487d
      Nicolas Dichtel 提交于
      Regularly, when a new header is created in include/uapi/, the developer
      forgets to add it in the corresponding Kbuild file. This error is usually
      detected after the release is out.
      
      In fact, all headers under uapi directories should be exported, thus it's
      useless to have an exhaustive list.
      
      After this patch, the following files, which were not exported, are now
      exported (with make headers_install_all):
      asm-arc/kvm_para.h
      asm-arc/ucontext.h
      asm-blackfin/shmparam.h
      asm-blackfin/ucontext.h
      asm-c6x/shmparam.h
      asm-c6x/ucontext.h
      asm-cris/kvm_para.h
      asm-h8300/shmparam.h
      asm-h8300/ucontext.h
      asm-hexagon/shmparam.h
      asm-m32r/kvm_para.h
      asm-m68k/kvm_para.h
      asm-m68k/shmparam.h
      asm-metag/kvm_para.h
      asm-metag/shmparam.h
      asm-metag/ucontext.h
      asm-mips/hwcap.h
      asm-mips/reg.h
      asm-mips/ucontext.h
      asm-nios2/kvm_para.h
      asm-nios2/ucontext.h
      asm-openrisc/shmparam.h
      asm-parisc/kvm_para.h
      asm-powerpc/perf_regs.h
      asm-sh/kvm_para.h
      asm-sh/ucontext.h
      asm-tile/shmparam.h
      asm-unicore32/shmparam.h
      asm-unicore32/ucontext.h
      asm-x86/hwcap2.h
      asm-xtensa/kvm_para.h
      drm/armada_drm.h
      drm/etnaviv_drm.h
      drm/vgem_drm.h
      linux/aspeed-lpc-ctrl.h
      linux/auto_dev-ioctl.h
      linux/bcache.h
      linux/btrfs_tree.h
      linux/can/vxcan.h
      linux/cifs/cifs_mount.h
      linux/coresight-stm.h
      linux/cryptouser.h
      linux/fsmap.h
      linux/genwqe/genwqe_card.h
      linux/hash_info.h
      linux/kcm.h
      linux/kcov.h
      linux/kfd_ioctl.h
      linux/lightnvm.h
      linux/module.h
      linux/nbd-netlink.h
      linux/nilfs2_api.h
      linux/nilfs2_ondisk.h
      linux/nsfs.h
      linux/pr.h
      linux/qrtr.h
      linux/rpmsg.h
      linux/sched/types.h
      linux/sed-opal.h
      linux/smc.h
      linux/smc_diag.h
      linux/stm.h
      linux/switchtec_ioctl.h
      linux/vfio_ccw.h
      linux/wil6210_uapi.h
      rdma/bnxt_re-abi.h
      
      Note that I have removed from this list the files which are generated in every
      exported directories (like .install or .install.cmd).
      
      Thanks to Julien Floret <julien.floret@6wind.com> for the tip to get all
      subdirs with a pure makefile command.
      
      For the record, note that exported files for asm directories are a mix of
      files listed by:
       - include/uapi/asm-generic/Kbuild.asm;
       - arch/<arch>/include/uapi/asm/Kbuild;
       - arch/<arch>/include/asm/Kbuild.
      Signed-off-by: NNicolas Dichtel <nicolas.dichtel@6wind.com>
      Acked-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Acked-by: NRussell King <rmk+kernel@armlinux.org.uk>
      Acked-by: NMark Salter <msalter@redhat.com>
      Acked-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc)
      Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
      fcc8487d
  21. 27 4月, 2017 1 次提交
  22. 29 3月, 2017 1 次提交