Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp911762rwd; Tue, 16 May 2023 09:09:44 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5EnM/5l6rHk2DAd0/VkGWBzWNfQUjQDo1ZpqpF8ZMnoYnYir7x8zDLZj/x7L41l09UO/NA X-Received: by 2002:a05:6808:b3a:b0:394:29e6:addb with SMTP id t26-20020a0568080b3a00b0039429e6addbmr10701150oij.50.1684253384596; Tue, 16 May 2023 09:09:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684253384; cv=none; d=google.com; s=arc-20160816; b=gjypnsRTulU84F08nVezaP4+x/Po2pYmScrssHkzQ1VwrCq4qH0k0LSM0JzHr7sL2l EazI4JwhUXh6+f+kJ3UOb2shYEXHI4YcXKrB/b4yAHuUmMB020n02JYY0r57gD0C+OZE WK2vXBMWRXIkpjNoQptw+MsiQN4S1lN29EdsYe88MgCAUZloDZ/3K05EQehXcQgs9xQy 14WH9i5g99xKIWdZ0skw7JeSp72/BFcXNUDYMlj2m/ypnZNBvOMibhXMMYSVeKorRXch Ep/ub55jr+32hYAIHIET1d3los0xHZA6YO0mxfgmkibZLVo32BkepbHYYvKB8nlc0JEt xqLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=GJtq3zPqxUl9tCbCV71bOMhZr+vdPw+gxjXQtYRK4GQ=; b=ztIENLKm/mtP6+AYQsnRDJ/SJRx/Ly9bonOP/c/KugmIb0WbchrTx0Jt+ztgWRfuOV 5SbLxgCby3EB4GWCgfaFRlTSubwfAjb5F66GuVCPQd9qNrTyuPaWeQEkOF7HqdCNtCvu CtWvrkUil050PT7b7N9w4f+xFMc3sITrctf9vTG3PJKSrXZfMPaJfA8LburKODOPzghS CgaEPtoig8O4c65xpyTPwIqie7B24+8KF57plwmBXR9C9XP+0QAuklVISOUEEpfrMnEk fa4trht94lBpgpljtvylKxWvNym2Jo5Xy04Wdo2Q0PqASHpbpBjgAxBVnB6nOjv6VsY/ LWxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NCS2Zz8p; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bf16-20020a056808191000b0039445b4a1e9si10504220oib.342.2023.05.16.09.09.31; Tue, 16 May 2023 09:09:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NCS2Zz8p; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234350AbjEPQF1 (ORCPT + 99 others); Tue, 16 May 2023 12:05:27 -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 X-Spam-Status: No, score=-9.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-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)