From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Tue, 7 May 2013 13:04:15 +0200 From: Ingo Molnar To: Peter Zijlstra Cc: Stephane Eranian , Andi Kleen , LKML , stable@vger.kernel.org, Andi Kleen Subject: Re: [PATCH 2/2] perf, x86: Don't allow unusual PEBS raw flags Message-ID: <20130507110415.GA20999@gmail.com> References: <1366844694-2770-1-git-send-email-andi@firstfloor.org> <1366844694-2770-2-git-send-email-andi@firstfloor.org> <20130502073720.GH7521@dyad.programming.kicks-ass.net> <20130506185226.GA17723@dyad.programming.kicks-ass.net> <20130507064804.GE17705@gmail.com> <20130507084803.GD9688@dyad.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130507084803.GD9688@dyad.programming.kicks-ass.net> Sender: linux-kernel-owner@vger.kernel.org List-ID: * Peter Zijlstra wrote: > On Tue, May 07, 2013 at 08:48:05AM +0200, Ingo Molnar wrote: > > Also, this code only runs when the event is set up, so a bit of sanity > > checking can only help, right? > > Nah, its all very circumspect. In fact; while what Andi states is 'true': > > > documentation in the Intel SDM 18.6.1.1 states: > > > > """ > > PEBS events are only valid when the following fields of IA32_PERFEVTSELx are all > > zero: AnyThread, Edge, Invert, CMask. > > """ > > It is also true that Intel themselves gave us events that contradict this; look > at the intel_pebs_aliases*() functions. > > This patch would make it impossible to manually create those events. I missed that bit of obfuscation ... > Further, there's something entirely different behind this. Ok, I agree with you, this needs to be fully explained. Thanks, Ingo