1. 02 12月, 2016 2 次提交
  2. 23 11月, 2016 12 次提交
  3. 21 11月, 2016 1 次提交
    • B
      x86/MCE/AMD: Fix thinko about thresholding_en · 254fe9c7
      Borislav Petkov 提交于
      So adding thresholding_en et al was a good thing for removing the
      per-CPU thresholding callback, i.e., threshold_cpu_callback.
      
      But, in order for it to work and especially that test in
      mce_threshold_create_device() so that all thresholding banks get
      properly created and not the whole thing to fail with a NULL ptr
      dereference at mce_cpu_pre_down() when we offline the CPUs, we need to
      set the thresholding_en flag *before* we start creating the devices.
      
      Yap, it failed because thresholding_en wasn't set at the time
      we were creating the banks so we didn't create any and then at
      mce_cpu_pre_down() -> mce_threshold_remove_device() time, we would blow
      up.
      
      And the fix is actually easy: we have thresholding on the system when we
      have managed to set the thresholding vector to amd_threshold_interrupt()
      earlier in mce_amd_feature_init() while we were picking apart the
      thresholding banks and what is set and what not.
      
      So let's do that.
      Signed-off-by: NBorislav Petkov <bp@suse.de>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Yazen Ghannam <Yazen.Ghannam@amd.com>
      Fixes: 4d7b02d5 ("x86/mcheck: Split threshold_cpu_callback into two callbacks")
      Link: http://lkml.kernel.org/r/20161119103402.5227-1-bp@alien8.deSigned-off-by: NIngo Molnar <mingo@kernel.org>
      254fe9c7
  4. 16 11月, 2016 7 次提交
  5. 10 11月, 2016 6 次提交
  6. 04 11月, 2016 12 次提交
    • J
      MIPS: Fix max_low_pfn with disabled highmem · 16a767ec
      James Hogan 提交于
      When low memory doesn't reach HIGHMEM_START (e.g. up to 256MB at PA=0 is
      common) and highmem is present above HIGHMEM_START (e.g. on Malta the
      RAM overlayed by the IO region is aliased at PA=0x90000000), max_low_pfn
      will be initially calculated very large and then clipped down to
      HIGHMEM_START.
      
      This causes crashes when reading /sys/kernel/mm/page_idle/bitmap
      (i.e. CONFIG_IDLE_PAGE_TRACKING=y) when highmem is disabled. pfn_valid()
      will compare against max_mapnr which is derived from max_low_pfn when
      there is no highend_pfn set up, and will return true for PFNs right up
      to HIGHMEM_START, even though they are beyond the end of low memory and
      no page structs will actually exist for these PFNs.
      
      This is fixed by skipping high memory regions when initially calculating
      max_low_pfn if highmem is disabled, so it doesn't get clipped too high.
      We also clip regions which overlap the highmem boundary when highmem is
      disabled, so that max_pfn doesn't extend into highmem either.
      Signed-off-by: NJames Hogan <james.hogan@imgtec.com>
      Cc: Paul Burton <paul.burton@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/14490/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      16a767ec
    • M
      MIPS: Correct MIPS I FP sigcontext layout · f92722dc
      Maciej W. Rozycki 提交于
      Complement commit 80cbfad7 ("MIPS: Correct MIPS I FP context
      layout") and correct the way Floating Point General registers are stored
      in a signal context with MIPS I hardware.
      
      Use the S.D and L.D assembly macros to have pairs of SWC1 instructions
      and pairs of LWC1 instructions produced, respectively, in an arrangement
      which makes the memory representation of floating-point data passed
      compatible with that used by hardware SDC1 and LDC1 instructions, where
      available, regardless of the hardware endianness used.  This matches the
      layout used by r4k_fpu.S, ensuring run-time compatibility for MIPS I
      software across all o32 hardware platforms.
      
      Define an EX2 macro to handle exceptions from both hardware instructions
      implicitly produced from S.D and L.D assembly macros.
      Signed-off-by: NMaciej W. Rozycki <macro@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/14477/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      f92722dc
    • M
      MIPS: Fix ISA I/II FP signal context offsets · 758ef0a9
      Maciej W. Rozycki 提交于
      Fix a regression introduced with commit 2db9ca0a ("MIPS: Use struct
      mips_abi offsets to save FP context") for MIPS I/I FP signal contexts,
      by converting save/restore code to the updated internal API.  Start FGR
      offsets from 0 rather than SC_FPREGS from $a0 and use $a1 rather than
      the offset of SC_FPC_CSR from $a0 for the Floating Point Control/Status
      Register (FCSR).
      
      Document the new internal API and adjust assembly code formatting for
      consistency.
      Signed-off-by: NMaciej W. Rozycki <macro@imgtec.com>
      Cc: Paul Burton <paul.burton@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/14476/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      758ef0a9
    • M
      MIPS: Remove FIR from ISA I FP signal context · 6daaa326
      Maciej W. Rozycki 提交于
      Complement commit e50c0a8f ("Support the MIPS32 / MIPS64 DSP ASE.")
      and remove the Floating Point Implementation Register (FIR) from the FP
      register set recorded in a signal context with MIPS I processors too, in
      line with the change applied to r4k_fpu.S.
      
      The `sc_fpc_eir' slot is unused according to our current ABI and the FIR
      register is read-only and always directly accessible from user software.
      
      [ralf@linux-mips.org: This is also required because the next commit depends
      on it.]
      Signed-off-by: NMaciej W. Rozycki <macro@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/14475/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      6daaa326
    • M
      MIPS: Fix ISA I FP sigcontext access violation handling · 35938a00
      Maciej W. Rozycki 提交于
      Complement commit 0ae8dceaebe3 ("Merge with 2.3.10.") and use the local
      `fault' handler to recover from FP sigcontext access violation faults,
      like corresponding code does in r4k_fpu.S.  The `bad_stack' handler is
      in syscall.c and is not suitable here as we want to propagate the error
      condition up through the caller rather than killing the thread outright.
      Signed-off-by: NMaciej W. Rozycki <macro@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/14474/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      35938a00
    • M
      MIPS: Fix FCSR Cause bit handling for correct SIGFPE issue · 5a1aca44
      Maciej W. Rozycki 提交于
      Sanitize FCSR Cause bit handling, following a trail of past attempts:
      
      * commit 42495484 ("MIPS: ptrace: Fix FP context restoration FCSR
      regression"),
      
      * commit 443c4403 ("MIPS: Always clear FCSR cause bits after
      emulation"),
      
      * commit 64bedffe ("MIPS: Clear [MSA]FPE CSR.Cause after
      notify_die()"),
      
      * commit b1442d39 ("MIPS: Prevent user from setting FCSR cause
      bits"),
      
      * commit b54d2901517d ("Properly handle branch delay slots in connection
      with signals.").
      
      Specifically do not mask these bits out in ptrace(2) processing and send
      a SIGFPE signal instead whenever a matching pair of an FCSR Cause and
      Enable bit is seen as execution of an affected context is about to
      resume.  Only then clear Cause bits, and even then do not clear any bits
      that are set but masked with the respective Enable bits.  Adjust Cause
      bit clearing throughout code likewise, except within the FPU emulator
      proper where they are set according to IEEE 754 exceptions raised as the
      operation emulated executed.  Do so so that any IEEE 754 exceptions
      subject to their default handling are recorded like with operations
      executed by FPU hardware.
      Signed-off-by: NMaciej W. Rozycki <macro@imgtec.com>
      Cc: Paul Burton <paul.burton@imgtec.com>
      Cc: James Hogan <james.hogan@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/14460/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      5a1aca44
    • M
      MIPS: ptrace: Also initialize the FP context on individual FCSR writes · c9e56039
      Maciej W. Rozycki 提交于
      Complement commit ac9ad83b ("MIPS: prevent FP context set via ptrace
      being discarded") and also initialize the FP context whenever FCSR alone
      is written with a PTRACE_POKEUSR request addressing FPC_CSR, rather than
      along with the full FPU register set in the case of the PTRACE_SETFPREGS
      request.
      Signed-off-by: NMaciej W. Rozycki <macro@imgtec.com>
      Cc: Paul Burton <paul.burton@imgtec.com>
      Cc: James Hogan <james.hogan@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/14459/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      c9e56039
    • J
      MIPS: dump_tlb: Fix printk continuations · 8a98495c
      James Hogan 提交于
      Since commit 4bcc595c ("printk: reinstate KERN_CONT for printing
      continuation lines") the output from TLB dumps on MIPS has been
      pretty unreadable due to the lack of KERN_CONT markers. Use pr_cont to
      provide the appropriate markers & restore the expected output.
      
      Continuation is also used for the second line of each TLB entry printed
      in dump_tlb.c even though it has a newline, since it is a continuation
      of the interpretation of the same TLB entry. For example:
      
      [   46.371884] Index:  0 pgmask=16kb va=77654000 asid=73 gid=00
              [ri=0 xi=0 pa=ffc18000 c=5 d=0 v=1 g=0] [ri=0 xi=0 pa=ffc1c000 c=5 d=0 v=1 g=0]
      [   46.385380] Index: 12 pgmask=16kb va=004b4000 asid=73 gid=00
              [ri=0 xi=0 pa=00000000 c=0 d=0 v=0 g=0] [ri=0 xi=0 pa=ffb00000 c=5 d=1 v=1 g=0]
      Signed-off-by: NJames Hogan <james.hogan@imgtec.com>
      Cc: Maciej W. Rozycki <macro@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/14444/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      8a98495c
    • P
      MIPS: Fix __show_regs() output · 752f5499
      Paul Burton 提交于
      Since commit 4bcc595c ("printk: reinstate KERN_CONT for printing
      continuation lines") the output from __show_regs() on MIPS has been
      pretty unreadable due to the lack of KERN_CONT markers. Use pr_cont to
      provide the appropriate markers & restore the expected register output.
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      Signed-off-by: NMatt Redfearn <matt.redfearn@imgtec.com>
      Cc: Maciej W. Rozycki <macro@imgtec.com>
      Cc: James Hogan <james.hogan@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/14432/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      752f5499
    • M
      MIPS: traps: Fix output of show_code · 41000c58
      Matt Redfearn 提交于
      Since commit 4bcc595c ("printk: reinstate KERN_CONT for printing
      continuation lines") the output from show_code on MIPS has been
      pretty unreadable due to the lack of KERN_CONT markers. Use pr_cont to
      provide the appropriate markers & restore the expected output.
      Signed-off-by: NMatt Redfearn <matt.redfearn@imgtec.com>
      Cc: Maciej W. Rozycki <macro@imgtec.com>
      Cc: James Hogan <james.hogan@imgtec.com>
      Cc: Paul Burton <paul.burton@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/14431/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      41000c58
    • M
      MIPS: traps: Fix output of show_stacktrace · fe4e09e7
      Matt Redfearn 提交于
      Since commit 4bcc595c ("printk: reinstate KERN_CONT for printing
      continuation lines") the output from show_stacktrace on MIPS has been
      pretty unreadable due to the lack of KERN_CONT markers. Use pr_cont to
      provide the appropriate markers & restore the expected output. Also
      start a new line with printk such that the presence of timing
      information does not interfere with output.
      Signed-off-by: NMatt Redfearn <matt.redfearn@imgtec.com>
      Cc: Maciej W. Rozycki <macro@imgtec.com>
      Cc: James Hogan <james.hogan@imgtec.com>
      Cc: Paul Burton <paul.burton@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/14430/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      fe4e09e7
    • M
      MIPS: traps: Fix output of show_backtrace · bcf084de
      Matt Redfearn 提交于
      Since commit 4bcc595c ("printk: reinstate KERN_CONT for printing
      continuation lines") the output from show_backtrace on MIPS has been
      pretty unreadable due to the lack of KERN_CONT markers. Use pr_cont to
      provide the appropriate markers & restore the expected output.
      Signed-off-by: NMatt Redfearn <matt.redfearn@imgtec.com>
      Cc: Maciej W. Rozycki <macro@imgtec.com>
      Cc: James Hogan <james.hogan@imgtec.com>
      Cc: Paul Burton <paul.burton@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/14429/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      bcf084de