Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3877330imu; Fri, 30 Nov 2018 07:23:41 -0800 (PST) X-Google-Smtp-Source: AFSGD/WtIvUKth8bpVr0WEqsHpOgOBJv4al1nWBOfzshIi6fxtNrgRGeYrtN0XRcyjO7FxBYZ4fL X-Received: by 2002:a17:902:346:: with SMTP id 64mr6227284pld.337.1543591421568; Fri, 30 Nov 2018 07:23:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543591421; cv=none; d=google.com; s=arc-20160816; b=C2vMRr+9mU4t1HUBizLKarg4KeuQSVgyCQzgfg2814+nTamEEjDTJbujvW4Aet2fJn F6cAdhVfSuDDMW0TasBvUF2RUF1j+4LO9oQZAXLvCc9npgYwj890B9MPKr1b3MAp+L/n dJLAfGTxmT1fR3S28DhIOKby1n6PNkylH3MB/hBLZjTnKaPd8iZcCIMpM+gzONPnCGUG 3RFiQeO3YmfsW2V+96R+e15YS3lO92Sc6l01jlP8MS6aQ6BvXTl3AWYhnp4ak5SXyDAM VhZ/aZe7OFFeFFDTq2YoGaLRjPX8SbOzW4EBJ5JkrtDN5D4Us99ykYt2b4U+eOHJt+kC CpQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=/RbnH0YRQZ+GXvaKYzscKvlzaN4IlObI1Ju6oBJyrxk=; b=v57TMkXMCj1i/Ovlr+saYDwYxYSFv2WyeG7OfUJORnWXQGm32cqEhN9Saax5gSQVz7 p9a5dIahVRV+P6KSQ4jTB/whwP3NghekDl2gJ+ujw5lJPZPStk7O9ajNMhk5/rTZuTgH 2lk/fzyO0DbOS5tU3XlJwhbTHLiZ2JeT6V12lYPJz5m4i9tosYnMlvp5bw+2PfKio9FI AAkD2kUV8RQaK+Rcr38Uy+0tA2sQ9rD/n7OMVYPNAJNTegOCNiz0gfueK5t+huGa6plW ieAOlxov1m+vD38KkEdSTc6W4soOrSF2Bx1iaJUwlZgQSZAVPX3Jauva4z8AIUkpFTRn Jekg== 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 p22si4978252pgl.340.2018.11.30.07.23.12; Fri, 30 Nov 2018 07:23:41 -0800 (PST) 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 S1726678AbeLACao (ORCPT + 99 others); Fri, 30 Nov 2018 21:30:44 -0500 Received: from mail.kernel.org ([198.145.29.99]:50576 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726127AbeLACao (ORCPT ); Fri, 30 Nov 2018 21:30:44 -0500 Received: from gandalf.local.home (cpe-66-24-56-78.stny.res.rr.com [66.24.56.78]) (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 9B40420868; Fri, 30 Nov 2018 15:21:03 +0000 (UTC) Date: Fri, 30 Nov 2018 10:21:02 -0500 From: Steven Rostedt To: Anders Roxell Cc: keescook@chromium.org, mingo@redhat.com, catalin.marinas@arm.com, will.deacon@arm.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Arnd Bergmann Subject: Re: [PATCH 1/3] stackleak: mark stackleak_track_stack() as notrace Message-ID: <20181130102102.041b8291@gandalf.local.home> In-Reply-To: <20181130150859.27366-1-anders.roxell@linaro.org> References: <20181130150859.27366-1-anders.roxell@linaro.org> X-Mailer: Claws Mail 3.16.0 (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 Fri, 30 Nov 2018 16:08:59 +0100 Anders Roxell wrote: > Function graph tracing recurses into itself when stackleak is enabled, > causing the ftrace graph selftest to run for up to 90 seconds and > trigger the softlockup watchdog. > > Breakpoint 2, ftrace_graph_caller () at ../arch/arm64/kernel/entry-ftrace.S:200 > 200 mcount_get_lr_addr x0 // pointer to function's saved lr > (gdb) bt > \#0 ftrace_graph_caller () at ../arch/arm64/kernel/entry-ftrace.S:200 > \#1 0xffffff80081d5280 in ftrace_caller () at ../arch/arm64/kernel/entry-ftrace.S:153 > \#2 0xffffff8008555484 in stackleak_track_stack () at ../kernel/stackleak.c:106 > \#3 0xffffff8008421ff8 in ftrace_ops_test (ops=0xffffff8009eaa840 , ip=18446743524091297036, regs=) at ../kernel/trace/ftrace.c:1507 > \#4 0xffffff8008428770 in __ftrace_ops_list_func (regs=, ignored=, parent_ip=, ip=) at ../kernel/trace/ftrace.c:6286 > \#5 ftrace_ops_no_ops (ip=18446743524091297036, parent_ip=18446743524091242824) at ../kernel/trace/ftrace.c:6321 > \#6 0xffffff80081d5280 in ftrace_caller () at ../arch/arm64/kernel/entry-ftrace.S:153 > \#7 0xffffff800832fd10 in irq_find_mapping (domain=0xffffffc03fc4bc80, hwirq=27) at ../kernel/irq/irqdomain.c:876 > \#8 0xffffff800832294c in __handle_domain_irq (domain=0xffffffc03fc4bc80, hwirq=27, lookup=true, regs=0xffffff800814b840) at ../kernel/irq/irqdesc.c:650 > \#9 0xffffff80081d52b4 in ftrace_graph_caller () at ../arch/arm64/kernel/entry-ftrace.S:205 > > Rework so we mark stackleak_track_stack as notrace > > Co-developed-by: Arnd Bergmann > Signed-off-by: Arnd Bergmann > Signed-off-by: Anders Roxell Acked-by: Steven Rostedt (VMware) -- Steve > --- > kernel/stackleak.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/kernel/stackleak.c b/kernel/stackleak.c > index e42892926244..5de3bf596dd7 100644 > --- a/kernel/stackleak.c > +++ b/kernel/stackleak.c > @@ -102,7 +102,7 @@ asmlinkage void stackleak_erase(void) > current->lowest_stack = current_top_of_stack() - THREAD_SIZE/64; > } > > -void __used stackleak_track_stack(void) > +void __used notrace stackleak_track_stack(void) > { > /* > * N.B. stackleak_erase() fills the kernel stack with the poison value,