Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756548AbcCUPGT (ORCPT ); Mon, 21 Mar 2016 11:06:19 -0400 Received: from www.linutronix.de ([62.245.132.108]:44270 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755715AbcCUPGP (ORCPT ); Mon, 21 Mar 2016 11:06:15 -0400 Date: Mon, 21 Mar 2016 16:04:45 +0100 (CET) From: Thomas Gleixner To: Peter Zijlstra cc: "Liang, Kan" , LKML , "x86@kernel.org" , Stephane Eranian , Borislav Petkov , "Andi Kleen (ak@linux.intel.com)" Subject: Re: [patch 2/4] x86/perf/intel/cstate: Sanitize probing In-Reply-To: Message-ID: References: <20160320185527.763205536@linutronix.de> <20160320185623.500381872@linutronix.de> <37D7C6CF3E00A74B8858931C1DB2F077058A7665@SHSMSX103.ccr.corp.intel.com> <20160321144218.GW6344@twins.programming.kicks-ass.net> User-Agent: Alpine 2.11 (DEB 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 644 Lines: 20 On Mon, 21 Mar 2016, Thomas Gleixner wrote: > 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. Duh, ignore it. Brain not working.