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 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F384AC433F5 for ; Fri, 15 Oct 2021 13:11:53 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B29496108E for ; Fri, 15 Oct 2021 13:11:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org B29496108E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Mime-Version:References:In-Reply-To: Message-Id:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=9cohpC2PCGOvEp2FRMD++h47bsjsRQ2+MbxtpukfL7g=; b=1m/ATMgADQtaaN KKDz1M8adWn0FHe34iVJki1WvzGj8peK/+9z5Yb12u8P9JaY6i62Z10tXal+h7S+5NJ8wpYJmmAKh J7LPg2/lZKRs8vy5QP2WQsOTgYTg+n+MgOtb8Ynl0m3cBdXbYbA9TYS4vybIw0roBmqxQyoXzj+T2 +SLBiMpBpzDh7kmVgmF8vM2STWkzrcERpKW0etU+YC7c/BzhjpU1yGuMy6MmgkX7jV2t9qxGE9yqs F05TDwoG19Ba/RCgNf+bT04mH4BYzVktCMY2fbM6aJFV4t+8Zxwd2TnqxXj/Ig/80rKfm3fxv6xad DXX4b3DGpBjN2s8wNrZw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mbMyf-0079Dj-Lv; Fri, 15 Oct 2021 13:10:25 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mbMyY-0079BI-3z for linux-arm-kernel@lists.infradead.org; Fri, 15 Oct 2021 13:10:23 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 11D53611C3; Fri, 15 Oct 2021 13:10:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1634303417; bh=P2BeoMAkiudgWbX946jwmj5l1omZI6aI6TZn2ZUN/qo=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=RbWTn8uDLhWZ3wR8CjLDbw8l54/rsXfq9bmxmiYRd2Ix6wKON8XFvc8ELxtzhkyTY 4yNgIxNc2KikAH9IO5Y5dtBYdEgf32Jf1P85OxgXa4i6TP22eXEvjsY+1QgDzvOWeB /ahRphw5njZIRA6ghGbDO864TBDIQQgutdyw6an83eALSf3y1o8a/dumBlGobjUZz5 XzgN7jp+Mtmy+2aU4hb3eqVbg+DdDPIVE0xx0UyivKxhPY7034/SztT+1ABJH8fX1z 0mWlXe0uqyR6+p5dysE0HYOcgCusBVz0Twb2KiSUvJXdO2/xcCx1ZtifLpCsMNsuPE HT+we5v/MPD8Q== Date: Fri, 15 Oct 2021 22:10:14 +0900 From: Masami Hiramatsu To: Masami Hiramatsu Cc: Steven Rostedt , "Naveen N . Rao" , Ananth N Mavinakayanahalli , Ingo Molnar , linux-kernel@vger.kernel.org, Sven Schnelle , Catalin Marinas , Will Deacon , Russell King , Nathan Chancellor , Nick Desaulniers , linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH 03/10] x86/unwind: Compile kretprobe fixup code only if CONFIG_KRETPROBES=y Message-Id: <20211015221014.5be86007034a5ed9356848b3@kernel.org> In-Reply-To: <163430227030.459050.12754362425825951410.stgit@devnote2> References: <163430224341.459050.2369208860773018092.stgit@devnote2> <163430227030.459050.12754362425825951410.stgit@devnote2> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) Mime-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211015_061018_542776_9780D49F X-CRM114-Status: GOOD ( 15.17 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, 15 Oct 2021 21:51:10 +0900 Masami Hiramatsu wrote: > Compile kretprobe related stacktrace entry recovery code and > unwind_state::kr_cur field only when CONFIG_KRETPROBES=y. Oh, this is another new patch, and is a kind of cleanup. No functionality change, but a bit reducing memory usage when CONFIG_KRETPROBES=n. Thank you, > > Signed-off-by: Masami Hiramatsu > --- > arch/x86/include/asm/unwind.h | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/arch/x86/include/asm/unwind.h b/arch/x86/include/asm/unwind.h > index fca2e783e3ce..2a1f8734416d 100644 > --- a/arch/x86/include/asm/unwind.h > +++ b/arch/x86/include/asm/unwind.h > @@ -16,7 +16,9 @@ struct unwind_state { > unsigned long stack_mask; > struct task_struct *task; > int graph_idx; > +#ifdef CONFIG_KRETPROBES > struct llist_node *kr_cur; > +#endif > bool error; > #if defined(CONFIG_UNWINDER_ORC) > bool signal, full_regs; > @@ -105,9 +107,13 @@ static inline > unsigned long unwind_recover_kretprobe(struct unwind_state *state, > unsigned long addr, unsigned long *addr_p) > { > +#ifdef CONFIG_KRETPROBES > return is_kretprobe_trampoline(addr) ? > kretprobe_find_ret_addr(state->task, addr_p, &state->kr_cur) : > addr; > +#else > + return addr; > +#endif > } > > /* Recover the return address modified by kretprobe and ftrace_graph. */ > -- Masami Hiramatsu _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel