1. 17 2月, 2016 6 次提交
  2. 09 2月, 2016 5 次提交
  3. 03 2月, 2016 1 次提交
  4. 29 1月, 2016 2 次提交
    • P
      perf/x86: De-obfuscate code · 8f04b853
      Peter Zijlstra 提交于
      Get rid of the 'onln' obfuscation.
      Signed-off-by: NPeter Zijlstra (Intel) <peterz@infradead.org>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Vince Weaver <vincent.weaver@maine.edu>
      Signed-off-by: NIngo Molnar <mingo@kernel.org>
      8f04b853
    • P
      perf/x86: Fix uninitialized value usage · e01d8718
      Peter Zijlstra 提交于
      When calling intel_alt_er() with .idx != EXTRA_REG_RSP_* we will not
      initialize alt_idx and then use this uninitialized value to index an
      array.
      
      When that is not fatal, it can result in an infinite loop in its
      caller __intel_shared_reg_get_constraints(), with IRQs disabled.
      
      Alternative error modes are random memory corruption due to the
      cpuc->shared_regs->regs[] array overrun, which manifest in either
      get_constraints or put_constraints doing weird stuff.
      
      Only took 6 hours of painful debugging to find this. Neither GCC nor
      Smatch warnings flagged this bug.
      Signed-off-by: NPeter Zijlstra (Intel) <peterz@infradead.org>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Kan Liang <kan.liang@intel.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Vince Weaver <vincent.weaver@maine.edu>
      Fixes: ae3f011f ("perf/x86/intel: Fix SLM MSR_OFFCORE_RSP1 valid_mask")
      Signed-off-by: NIngo Molnar <mingo@kernel.org>
      e01d8718
  5. 22 1月, 2016 1 次提交
  6. 14 1月, 2016 1 次提交
  7. 06 1月, 2016 14 次提交
  8. 19 12月, 2015 4 次提交
  9. 06 12月, 2015 4 次提交
  10. 04 12月, 2015 1 次提交
    • R
      x86/mm/mtrr: Mark the 'range_new' static variable in mtrr_calc_range_state() as __initdata · c332813b
      Rasmus Villemoes 提交于
      'range_new' doesn't seem to be used after init. It is only passed
      to memset(), sum_ranges(), memcmp() and x86_get_mtrr_mem_range(), the
      latter of which also only passes it on to various *range*
      library functions.
      
      So mark it __initdata to free up an extra page after init.
      
      Its contents are wiped at every call to mtrr_calc_range_state(),
      so it being static is not about preserving state between calls,
      but simply to avoid a 4k+ stack frame. While there, add a
      comment explaining this and why it's safe.
      
      We could also mark nr_range_new as __initdata, but since it's
      just a single int and also doesn't carry state between calls (it
      is unconditionally assigned to before it is read), we might as
      well make it an ordinary automatic variable.
      Signed-off-by: NRasmus Villemoes <linux@rasmusvillemoes.dk>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Toshi Kani <toshi.kani@hp.com>
      Link: http://lkml.kernel.org/r/1449002691-20783-1-git-send-email-linux@rasmusvillemoes.dkSigned-off-by: NIngo Molnar <mingo@kernel.org>
      c332813b
  11. 26 11月, 2015 1 次提交
    • L
      x86: Replace RDRAND forced-reseed with simple sanity check · 0007bccc
      Len Brown 提交于
      x86_init_rdrand() was added with 2 goals:
      
      1. Sanity check that the built-in-self-test circuit on the Digital
         Random Number Generator (DRNG) is not complaining.  As RDRAND
         HW self-checks on every invocation, this goal is achieved
         by simply invoking RDRAND and checking its return code.
      
      2. Force a full re-seed of the random number generator.
         This was done out of paranoia to benefit the most un-sophisticated
         DRNG implementation conceivable in the architecture,
         an implementation that does not exist, and unlikely ever will.
         This worst-case full-re-seed is achieved by invoking
         a 64-bit RDRAND 8192 times.
      
      Unfortunately, this worst-case re-seed costs O(1,000us).
      Magnifying this cost, it is done from identify_cpu(), which is the
      synchronous critical path to bring a processor on-line -- repeated
      for every logical processor in the system at boot and resume from S3.
      
      As it is very expensive, and of highly dubious value, we delete the
      worst-case re-seed from the kernel.
      
      We keep the 1st goal -- sanity check the hardware, and mark it absent
      if it complains.
      
      This change reduces the cost of x86_init_rdrand() by a factor of 1,000x,
      to O(1us) from O(1,000us).
      Signed-off-by: NLen Brown <len.brown@intel.com>
      Link: http://lkml.kernel.org/r/058618cc56ec6611171427ad7205e37e377aa8d4.1439738240.git.len.brown@intel.comSigned-off-by: NThomas Gleixner <tglx@linutronix.de>
      0007bccc