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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E02CBC77B75 for ; Tue, 16 May 2023 16:05:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234329AbjEPQF0 (ORCPT ); Tue, 16 May 2023 12:05:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57386 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234162AbjEPQFZ (ORCPT ); Tue, 16 May 2023 12:05:25 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DC8BE130; Tue, 16 May 2023 09:05:24 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 6F7ED633B5; Tue, 16 May 2023 16:05:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 24D8AC433EF; Tue, 16 May 2023 16:05:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684253123; bh=WyRb0cO3Dcn2zW5KolHtzKC/m3CXEA35/xNovR2+mVs=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=NCS2Zz8pxqjius3cIeMK7tjhFhsxId3BBRETFZma2dEBbqmn9f6SuTd2lZIRnTt9T hHkK4e+Cx6MPeUDdPZ0fwTAizNgNityDFGD5sy19v/a4jq2GCTg1FF0Jn8rVwnLng9 a0vJmEwoIbzmK2DkBlzmLDbPkpl9DpwSFrMwC1h+6eA1tvY8GFLDSAQdH58KYn1FSC ArtXT/RdjGCyQNQ2KAG7y1F3Nvc1Tpc71ewwBpAplzWKPFoKUciNxZBkonWaWUynqa kWUI6Rd0tpwC9UPT9E0yyrPpVvJhSgpIlVKKtgGScC7W1FOAq+1YqbSSZALcG/dzk4 W49qIyvsxZq9w== Date: Wed, 17 May 2023 01:05:17 +0900 From: Masami Hiramatsu (Google) To: Ze Gao Cc: Steven Rostedt , Albert Ou , Alexander Gordeev , Alexei Starovoitov , Borislav Petkov , Christian Borntraeger , Dave Hansen , Heiko Carstens , "H. Peter Anvin" , Ingo Molnar , Palmer Dabbelt , Paul Walmsley , Sven Schnelle , Thomas Gleixner , Vasily Gorbik , x86@kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-trace-kernel@vger.kernel.org, bpf@vger.kernel.org, Conor Dooley , Jiri Olsa , Yonghong Song , Ze Gao Subject: Re: [PATCH v2 4/4] rehook, fprobe: do not trace rethook related functions Message-Id: <20230517010517.9b7bf28a42067540f7a25638@kernel.org> In-Reply-To: <20230516071830.8190-5-zegao@tencent.com> References: <20230516071830.8190-1-zegao@tencent.com> <20230516071830.8190-5-zegao@tencent.com> X-Mailer: Sylpheed 3.8.0beta1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-trace-kernel@vger.kernel.org On Tue, 16 May 2023 15:18:30 +0800 Ze Gao wrote: > These functions are already marked as NOKPROBE to prevent recursion and > we have the same reason to blacklist them if rethook is used with fprobe, > since they are beyond the recursion-free region ftrace can guard. > > Signed-off-by: Ze Gao Looks good to me. Acked-by: Masami Hiramatsu (Google) Thank you! > --- > arch/riscv/kernel/probes/Makefile | 2 ++ > arch/s390/kernel/Makefile | 1 + > arch/x86/kernel/Makefile | 1 + > 3 files changed, 4 insertions(+) > > diff --git a/arch/riscv/kernel/probes/Makefile b/arch/riscv/kernel/probes/Makefile > index c40139e9ca47..8265ff497977 100644 > --- a/arch/riscv/kernel/probes/Makefile > +++ b/arch/riscv/kernel/probes/Makefile > @@ -4,3 +4,5 @@ obj-$(CONFIG_RETHOOK) += rethook.o rethook_trampoline.o > obj-$(CONFIG_KPROBES_ON_FTRACE) += ftrace.o > obj-$(CONFIG_UPROBES) += uprobes.o decode-insn.o simulate-insn.o > CFLAGS_REMOVE_simulate-insn.o = $(CC_FLAGS_FTRACE) > +CFLAGS_REMOVE_rethook.o = $(CC_FLAGS_FTRACE) > +CFLAGS_REMOVE_rethook_trampoline.o = $(CC_FLAGS_FTRACE) > diff --git a/arch/s390/kernel/Makefile b/arch/s390/kernel/Makefile > index 8983837b3565..6b2a051e1f8a 100644 > --- a/arch/s390/kernel/Makefile > +++ b/arch/s390/kernel/Makefile > @@ -10,6 +10,7 @@ CFLAGS_REMOVE_ftrace.o = $(CC_FLAGS_FTRACE) > > # Do not trace early setup code > CFLAGS_REMOVE_early.o = $(CC_FLAGS_FTRACE) > +CFLAGS_REMOVE_rethook.o = $(CC_FLAGS_FTRACE) > > endif > > diff --git a/arch/x86/kernel/Makefile b/arch/x86/kernel/Makefile > index dd61752f4c96..4070a01c11b7 100644 > --- a/arch/x86/kernel/Makefile > +++ b/arch/x86/kernel/Makefile > @@ -17,6 +17,7 @@ CFLAGS_REMOVE_ftrace.o = -pg > CFLAGS_REMOVE_early_printk.o = -pg > CFLAGS_REMOVE_head64.o = -pg > CFLAGS_REMOVE_sev.o = -pg > +CFLAGS_REMOVE_rethook.o = -pg > endif > > KASAN_SANITIZE_head$(BITS).o := n > -- > 2.40.1 > -- Masami Hiramatsu (Google)