From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8E1E0C282C2 for ; Wed, 13 Feb 2019 03:46:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5C38821B68 for ; Wed, 13 Feb 2019 03:46:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731241AbfBMDqq (ORCPT ); Tue, 12 Feb 2019 22:46:46 -0500 Received: from mail.kernel.org ([198.145.29.99]:40290 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727614AbfBMDqp (ORCPT ); Tue, 12 Feb 2019 22:46:45 -0500 Received: from vmware.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 144F221B1A; Wed, 13 Feb 2019 03:46:44 +0000 (UTC) Date: Tue, 12 Feb 2019 22:46:42 -0500 From: Steven Rostedt To: Kees Cook Cc: Dmitry Vyukov , syzbot , Abderrahmane Benbachir , Arnaldo Carvalho de Melo , Alexander Shishkin , Jiri Olsa , LKML , Ingo Molnar , Namhyung Kim , Peter Zijlstra , syzkaller-bugs Subject: Re: WARNING in event_function_local Message-ID: <20190212224642.6a0a5360@vmware.local.home> In-Reply-To: References: <001a1140589435c9b60563c76e3f@google.com> <20190212211449.5f48bee1@gandalf.local.home> X-Mailer: Claws Mail 3.15.1 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 12 Feb 2019 19:40:12 -0800 Kees Cook wrote: > > > Steve, what could possibly be happening here? Just adding more > > > tracepoints causes some kind of race where the task vs current test > > > trips in event_function_local(): > > > > > > if (WARN_ON_ONCE(task != current)) > > > goto unlock; > > > > That's perf code. How are you getting there? What's special about this > > run? You have perf running? > > Yes, the reproducer is in an 8-way parallel tight loop, doing: > > fd = syscall(__NR_perf_event_open, 0x20000140, 0, 0, -1, 0); > syscall(__NR_ioctl, fd, 0x2402, 0x100000001); > > I haven't decoded the structures that are passed in, but I'm at a loss > for how changing how many trace entries there are could impact the > race timing... O_o > > > > Is this maybe just an unlucky condition with the event loop running in > > > an IRQ? Should the WARN be expected, or is running under an IRQ > > > unexpected? > > Is perf expected to fire during an IRQ? The task == current test seems > suspicious if so... > That's a question for Peter. -- Steve