Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp34112yba; Fri, 5 Apr 2019 01:13:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqy/SS+63J48RtaJgwsf4T2w6//ji87AamKLrV3kaYKW4xO6XFIpIc0IBo5WqHFhC5wGR/KI X-Received: by 2002:a63:2b03:: with SMTP id r3mr10457021pgr.105.1554452021554; Fri, 05 Apr 2019 01:13:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554452021; cv=none; d=google.com; s=arc-20160816; b=H8EN4zGZCrm1A3wQERNU7sM3IFw3Pp0XVTo9Ivb78P+TqFH+u9xPQf5aCXMcZHM/so 0gNtWbBVhRlYNp+6OSJ3nxG3I+DZajgIPYZOCTo1/a2V/dUUmjLT0tB7yyyS4IwSA9NS 0upS0WoneYPZ50a2gSA+xNy1nJ5UZVLBiu2O3tUJa2SeQeo2PS0tOYk0nv9A0czqYrVq QwZQAPHHh1t4dTnF2ozEt/fsVXYO2ILhphPMsrJlFwWLBt5az+A0JqHq3Hk9IB3Jym4y 30SSBZ/BDyIWq9LSro92jbM6qZZUup7JOmeXgO+6h836EWx50YN7WtVmPaFGQnrEnx21 jk0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=STUiy9GSF12bpC4CUwP+YOr9NFetW1XmQF2nXcFrIQg=; b=rglMHTw1Cj4rhkmK7qI3acq+lGlxBd4UtWUPSPfj95EkTrAbRMYxcyZ1VU3GAQ+Tz9 JqUCIDfJazSOo1mj40UGo0J9kxIWOvhy339a/nR0plXhDtuEyjXEkMNf8kyYbjEz/Rhn y7X6N+7HzOpoYavQTvMeb59iv9hVCLsUInDKz69w58xUde3rht4+cD7sUSqqAN17KdZR fhkkiTZejxOHp9VCXgX7fb4r94lDS/GjDLZkEWifOQLUJ952/UQ4ynMR+KqJdvIvxfRD ii8NXnPjw8nhB+SJcMsOjPM9aR6lb83oKtAjSXmS9XZOfMvUMB+6Fg3I9baAv58JN5UP FHXQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 76si18941402pge.555.2019.04.05.01.13.26; Fri, 05 Apr 2019 01:13:41 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730361AbfDEIMb (ORCPT + 99 others); Fri, 5 Apr 2019 04:12:31 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:47225 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725955AbfDEIMb (ORCPT ); Fri, 5 Apr 2019 04:12:31 -0400 Received: from p5492e2fc.dip0.t-ipconnect.de ([84.146.226.252] helo=nanos) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1hCJxc-0004ol-9m; Fri, 05 Apr 2019 10:12:28 +0200 Date: Fri, 5 Apr 2019 10:12:27 +0200 (CEST) From: Thomas Gleixner To: Steven Rostedt cc: LKML , Peter Zijlstra , Ingo Molnar , Clark Williams , Juri Lelli , Masami Hiramatsu , Linus Torvalds Subject: Re: WARN_ON: userstacktrace on irq events In-Reply-To: <20190403121640.70128095@gandalf.local.home> Message-ID: References: <20190403121640.70128095@gandalf.local.home> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 3 Apr 2019, Steven Rostedt wrote: > Juri reported this from the -rt kernel, but I can easily trigger it in > mainline. By simply doing: > > # cd /sys/kernel/tracing > # echo 1 > options/userstacktrace > # echo 1 > events/irq/enable > This is simply caused by the irq trace events doing a user stack trace: > > ftrace_trace_userstack { > save_stack_trace_user { > __save_stack_trace_user { > copy_stack_frame { > access_ok { > WARN_ON_IN_IRQ() > > BOOM! Warn on. > > Can we make that access_ok() call in the copy_stack_frame not trigger > the warning just if we are in an interrupt? You really want to have access_ok_atomic() or such which does not have the WARN and use that in copy_stack_frame(). That's fine here because the actual copy is inside a pagefault disabled region. Thanks, tglx