Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1361916

Re: [patch 2/4] x86/perf/intel/cstate: Sanitize probing

From Thomas Gleixner <tglx@linutronix.de>
Newsgroups linux.kernel
Subject Re: [patch 2/4] x86/perf/intel/cstate: Sanitize probing
Date 2016-03-21 16:10 +0100
Message-ID <rf9CV-7tl-3@gated-at.bofh.it> (permalink)
References <reQTE-2Hh-11@gated-at.bofh.it> <reQTF-2Hh-29@gated-at.bofh.it> <rf8Qy-6S7-7@gated-at.bofh.it> <rf9jz-76M-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, 21 Mar 2016, Peter Zijlstra wrote:

> On Mon, Mar 21, 2016 at 02:19:27PM +0000, Liang, Kan wrote:
> 
> > > -	/* Probe the cstate events. */
> > > -	for (i = 0; i < max_event_nr; i++) {
> > > -		if (!msr[i].test(i) || rdmsrl_safe(msr[i].msr, &val))
> > > -			msr[i].attr = NULL;
> > > -	}
> > 
> > I think we need to update msr[i].attr as well.
> > Because in cstate_pmu_event_init we still need it to do check.
> 
> Yeah, this is exploding on all sides.. 

Gah crap. Why did this not explode in my face? Delta patch below.

Thanks,

	tglx

--- a/arch/x86/events/intel/cstate.c
+++ b/arch/x86/events/intel/cstate.c
@@ -553,6 +553,8 @@ static bool __init cstate_probe_msr(cons
 		if (!rdmsrl_safe(msr[bit].msr, &val)) {
 			*attrs++ = &msr[bit].attr->attr.attr;
 			found = true;
+		} else {
+			msr[bit].attr = NULL;
 		}
 	}
 	*attrs = NULL;

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[patch 0/4] x86/perf/intel/cstate: Fix cpu hotplug handling and make  it modular Thomas Gleixner <tglx@linutronix.de> - 2016-03-20 20:10 +0100
  [patch 1/4] x86/perf/intel/cstate: Make hotplug handling actually work Thomas Gleixner <tglx@linutronix.de> - 2016-03-20 20:10 +0100
    [tip:perf/core] x86/perf/intel/cstate: Make cstate hotplug handling  actually work tip-bot for Thomas Gleixner <tipbot@zytor.com> - 2016-03-31 11:30 +0200
  [patch 3/4] x86/perf/intel/cstate: Sanitize error handling Thomas Gleixner <tglx@linutronix.de> - 2016-03-20 20:10 +0100
    [tip:perf/core] x86/perf/intel/cstate: Sanitize error handling tip-bot for Thomas Gleixner <tipbot@zytor.com> - 2016-03-31 11:30 +0200
  [patch 2/4] x86/perf/intel/cstate: Sanitize probing Thomas Gleixner <tglx@linutronix.de> - 2016-03-20 20:10 +0100
    RE: [patch 2/4] x86/perf/intel/cstate: Sanitize probing "Liang, Kan" <kan.liang@intel.com> - 2016-03-21 15:20 +0100
      Re: [patch 2/4] x86/perf/intel/cstate: Sanitize probing Peter Zijlstra <peterz@infradead.org> - 2016-03-21 15:50 +0100
        Re: [patch 2/4] x86/perf/intel/cstate: Sanitize probing Thomas Gleixner <tglx@linutronix.de> - 2016-03-21 16:10 +0100
          Re: [patch 2/4] x86/perf/intel/cstate: Sanitize probing Thomas Gleixner <tglx@linutronix.de> - 2016-03-21 16:10 +0100
    [tip:perf/core] x86/perf/intel/cstate: Sanitize probing tip-bot for Thomas Gleixner <tipbot@zytor.com> - 2016-03-31 11:30 +0200
  [patch 4/4] x86/perf/intel/cstate: Modularize driver Thomas Gleixner <tglx@linutronix.de> - 2016-03-20 20:10 +0100
    [tip:perf/core] x86/perf/intel/cstate: Modularize driver tip-bot for Thomas Gleixner <tipbot@zytor.com> - 2016-03-31 11:30 +0200
  Re: [patch 0/4] x86/perf/intel/cstate: Fix cpu hotplug handling and  make it modular Peter Zijlstra <peterz@infradead.org> - 2016-03-21 16:10 +0100

csiph-web