Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1303296rwd; Tue, 16 May 2023 15:13:36 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6o0goTi8Bvi794xzoNRLltx8LOC2OOcpaum5hWWp3mDsD41jbsaZ1QjbWvU7GRJk7xYifg X-Received: by 2002:a05:6a00:218a:b0:640:defd:a6d5 with SMTP id h10-20020a056a00218a00b00640defda6d5mr45658481pfi.12.1684275216376; Tue, 16 May 2023 15:13:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684275216; cv=none; d=google.com; s=arc-20160816; b=cwLOhvwdnksPK9mFsqpUFB5g9+rF1ltTU4m2GICkPNsXJVVyxX6171yEbU50PNX0F9 NKRt6NxZIJmRUJZBw1KBtB6OpBbDgeIpmOZ8tWyp+tya4sl11WO/+nO/M0zal7PV/Qt4 espedijgy0w6+wITLgtRL1UfurgacCiuDUruBHNw3P5HMgxNPB39TPMg0AP5GNRYNiRp HtFw1yFQMHOiYP2AjJPkk62l5r6nXuFSpao0zO3KuTVhGiJbZvHXOqbRaaBjJ1PbbZIX XknZp7swVS20YahL52vdFSn4XKTJYn1ZnfJsnv8w2qrVLlcs81bWs4E2jHJv63ZUGL9L +7cg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:date:from:dkim-signature; bh=ZCrwAPuGKXq93TXqe6WXaYC1Q/y0jn1/n3v/MjlEJns=; b=zwHCue8dtRkPSwuOSiwzBTjsgHddZR0O+TYpz93ny2hhKFxrpKez0+zhBaaOM3VAy5 JOWuz1d0NlHdPM5JQil2rnXmDM28Tp32RRBUhXimfeFjeWLBgmdyMN00RDruwOtuDLk1 njfltNtFA9eIfESTln6YHMQYnsOOMhNd9JQb7ctbYSGgkCOiJf5HtoGDDQjSkabxBIfM 9lknX+isRNdbrxs89b4PzxLhfsT3MwlPCWyob3Q4pGdQ87Eli8TUxbyQkkqy/3vN8wsD uCz/1+y2wVGDuDoJ7+bshy5xMWaOV9Q2tLYI9z3HRZdxCkzrwCSCebb44rCxND4Z7NHL vWdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b="JR4x/5gS"; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v6-20020a626106000000b00646d42532f7si20221417pfb.191.2023.05.16.15.13.24; Tue, 16 May 2023 15:13:36 -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=@gmail.com header.s=20221208 header.b="JR4x/5gS"; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229936AbjEPVml (ORCPT + 99 others); Tue, 16 May 2023 17:42:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57600 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229565AbjEPVmk (ORCPT ); Tue, 16 May 2023 17:42:40 -0400 Received: from mail-ed1-x536.google.com (mail-ed1-x536.google.com [IPv6:2a00:1450:4864:20::536]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0D14C5FD2; Tue, 16 May 2023 14:42:39 -0700 (PDT) Received: by mail-ed1-x536.google.com with SMTP id 4fb4d7f45d1cf-50bc040c7b8so25411a12.2; Tue, 16 May 2023 14:42:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684273357; x=1686865357; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:date:from:from:to:cc:subject:date:message-id:reply-to; bh=ZCrwAPuGKXq93TXqe6WXaYC1Q/y0jn1/n3v/MjlEJns=; b=JR4x/5gSL9UBOTTLzKqCYxTw+bx1mkq+N2tp0cQoZ0Ey0OJRpdCcBjj6W5Ay2ZLVGs EJCBFb1qL76rpzwZC3KVUgqph2VG+pDMZgV2JH8i/qCyi2FFPDZdG7WageP4Jny+zw4B VDZkf2r95FYpsV5Wcr405f9S6PDZqXTUPwUy8LmYZm1aqmFu5gw1g6m5vcnLo8WaflDv PBr4RbftGq3yyvt/8YtmnaqDs4t26I1ShqQ1O4wqaTfXJNwLpYKR9d19X4JRj9OIR2dx XJmjef48zWkGhhTg2pV1cmyTme7GL/9IKf4RJyQTHz3gGE7ucHp0ObCtsVBQulRN1cbp DymA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684273357; x=1686865357; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:date:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=ZCrwAPuGKXq93TXqe6WXaYC1Q/y0jn1/n3v/MjlEJns=; b=cEyzoMNY8+VZO6IvmFr49NKQWxZuL0AfwjGOkIYPiCV4FIDFYoiytqNwM/nWhI3XVm JJ4py9yO+4cFO7gqTtXDkwfmZiMlO4R5Xt9HqO0qmC8mwZ7g1f8TbOd6uvUxgjBu6B2/ 8uQahIMOWBXXRAaoBF0exz4Na5cUg8ccaUV21lwUArKxNWRk4/lPpDCyYWwQWtWocnQr 65cRc0dGNR1nYEJniNSC0loHLH15+rVngTOlaqqLojma9mGkWlASNeB3+WzUDNms2VQm oqm3tVQ3Oz6RS4YAM1D8sp58cNtCtL3PpzMoeSHaKTL9uZEVEvFDBvidzSU2NtSK4GkH z56g== X-Gm-Message-State: AC+VfDzJbhvhQE+VfGBtdBQffhOV8WSgKDOETFOYv/rz6kIOVks1A7q3 nb79wHnsf5HWghmrTRwUKuc= X-Received: by 2002:a17:906:c14f:b0:94d:a2c2:9aeb with SMTP id dp15-20020a170906c14f00b0094da2c29aebmr41629990ejc.49.1684273357168; Tue, 16 May 2023 14:42:37 -0700 (PDT) Received: from krava ([83.240.62.62]) by smtp.gmail.com with ESMTPSA id ku11-20020a170907788b00b0094f5179540fsm11169179ejc.83.2023.05.16.14.42.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 May 2023 14:42:36 -0700 (PDT) From: Jiri Olsa X-Google-Original-From: Jiri Olsa Date: Tue, 16 May 2023 23:42:34 +0200 To: Ze Gao Cc: Steven Rostedt , Masami Hiramatsu , 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 , Yonghong Song , Ze Gao Subject: Re: [PATCH v2 0/4] Make fprobe + rethook immune to recursion Message-ID: References: <20230516071830.8190-1-zegao@tencent.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230516071830.8190-1-zegao@tencent.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,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, May 16, 2023 at 03:18:26PM +0800, Ze Gao wrote: > Hi all, > > This is the 2nd version of patch series to fix the ftrace rethook recursion problem. > > v1: https://lore.kernel.org/linux-trace-kernel/cover.1684120990.git.zegao@tencent.com/T/ +++#md4c0bae6a6cae28dadf2a2c6105ff140b35fddea > > As Steven suggested, this version removes unnecessary notrace annotations from fprobe > and rethook functions from v1 [PATCH 2,3,4/4] and replaces with makefile changes to filter > out compiler flags which ftrace depends upon for rethook related objects. > > Ze Gao (4): > rethook: use preempt_{disable, enable}_notrace in > rethook_trampoline_handler > fprobe: make fprobe_kprobe_handler recursion free > fprobe: add recursion detection in fprobe_exit_handler > rehook, fprobe: do not trace rethook related functions hi, what tree is this based on? I have troubles to apply that thanks, jirka > > arch/riscv/kernel/probes/Makefile | 2 + > arch/s390/kernel/Makefile | 1 + > arch/x86/kernel/Makefile | 1 + > kernel/trace/fprobe.c | 72 ++++++++++++++++++++++++------- > kernel/trace/rethook.c | 4 +- > 5 files changed, 63 insertions(+), 17 deletions(-) > > -- > 2.40.1 >