From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754164AbaEAN3Q (ORCPT ); Thu, 1 May 2014 09:29:16 -0400 Received: from www.linutronix.de ([62.245.132.108]:33283 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750741AbaEAN3P (ORCPT ); Thu, 1 May 2014 09:29:15 -0400 Date: Thu, 1 May 2014 15:29:19 +0200 (CEST) From: Thomas Gleixner To: Peter Zijlstra cc: Vince Weaver , Ingo Molnar , linux-kernel@vger.kernel.org, Steven Rostedt Subject: Re: [perf] more perf_fuzzer memory corruption In-Reply-To: Message-ID: References: <20140429094632.GP27561@twins.programming.kicks-ass.net> <20140429190108.GB30445@twins.programming.kicks-ass.net> <20140430184437.GH17778@laptop.programming.kicks-ass.net> <20140501102602.GP11096@twins.programming.kicks-ass.net> <20140501115042.GC13658@twins.programming.kicks-ass.net> User-Agent: Alpine 2.02 (DEB 1266 2009-07-14) 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 On Thu, 1 May 2014, Thomas Gleixner wrote: > On Thu, 1 May 2014, Peter Zijlstra wrote: > > On Thu, May 01, 2014 at 12:26:02PM +0200, Peter Zijlstra wrote: > > > On Thu, May 01, 2014 at 12:51:33AM +0200, Thomas Gleixner wrote: > > > > And that's the issue which puzzles us. Let's look at what we expect: > > > > > > > > Now the trace shows a different story: > > > > > > > > perf_fuzzer-4387 [001] 1802.628659: sys_enter: NR 298 (69bb58, 0, ffffffff, 12, 0, 0) > > > > > > That's a per-cpu event (.pid = -1, .cpu = 12), they don't get inherited, > > > so the only thing keeping it alive is the fd the child got. So > > > exit_files() killing this thing makes perfect sense. > > Duh, right. Should have noticed :( And having a second look: SYSCALL_DEFINE5(perf_event_open, struct perf_event_attr __user *, attr_uptr, pid_t, pid, int, cpu, int, group_fd, unsigned long, flags) sys_enter: NR 298 (69bb58, 0, ffffffff, 12, 0, 0) attr_uptr = 0x69bb58 pid = 0 cpu = -1 group_fd = 12 flags = 0