Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756515AbcCUOmZ (ORCPT ); Mon, 21 Mar 2016 10:42:25 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:39925 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756375AbcCUOmX (ORCPT ); Mon, 21 Mar 2016 10:42:23 -0400 Date: Mon, 21 Mar 2016 15:42:18 +0100 From: Peter Zijlstra To: "Liang, Kan" Cc: Thomas Gleixner , 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 Message-ID: <20160321144218.GW6344@twins.programming.kicks-ass.net> References: <20160320185527.763205536@linutronix.de> <20160320185623.500381872@linutronix.de> <37D7C6CF3E00A74B8858931C1DB2F077058A7665@SHSMSX103.ccr.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <37D7C6CF3E00A74B8858931C1DB2F077058A7665@SHSMSX103.ccr.corp.intel.com> User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 396 Lines: 12 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..