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 2078DC433EF for ; Fri, 25 Mar 2022 02:21:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1357703AbiCYCXD (ORCPT ); Thu, 24 Mar 2022 22:23:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56104 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1356215AbiCYCXB (ORCPT ); Thu, 24 Mar 2022 22:23:01 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 020BAB18A6; Thu, 24 Mar 2022 19:21: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 ams.source.kernel.org (Postfix) with ESMTPS id A044AB82791; Fri, 25 Mar 2022 02:21:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 18D69C340EC; Fri, 25 Mar 2022 02:21:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1648174882; bh=ivwDZgSZMeE+PCD2dfQWcyXhfqsyEJsULXN7F5jCXB4=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=l51ZcZz9ljlEyNgyBD5vxxE4D9ZRrROq4aOSgrp4vBYdm/MQHEad82u6Bnclb5rEp NabDQwWGTjhU/aDreeEIiEjiQs8yKcJN/37LE8C80+Ug76RInv5zVn2KrQOnHcsKoQ RkK9qjRzs7IysejMyu6UVWqEEdRuWe/L/KwSg5sRIhjfxCPNf22fShTg/xwR//9IhO LVb2xEnJBDfP4mIz8MFTAVF/fpor8y11eb5nJs7JdPlI6vQH3l66OTlg7kBNgRIRPa m1ic5KqYkQI1uiNUnyEa+Lv+vFzUUErp2ltcoClbbQZmlXQfMBEhJd884BcqZWvl0L GyvWEXXjssxQA== Date: Fri, 25 Mar 2022 11:21:14 +0900 From: Masami Hiramatsu To: Alexei Starovoitov Cc: Peter Zijlstra , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , X86 ML , Jiri Olsa , Alexei Starovoitov , Andrii Nakryiko , Daniel Borkmann , Andrii Nakryiko , Network Development , bpf , lkml , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Steven Rostedt , "Naveen N . Rao" , Anil S Keshavamurthy , "David S . Miller" Subject: Re: [PATCH v13 bpf-next 1/1] rethook: x86: Add rethook x86 implementation Message-Id: <20220325112114.4604291a58ee5b214ee334da@kernel.org> In-Reply-To: References: <164800288611.1716332.7053663723617614668.stgit@devnote2> <164800289923.1716332.9772144337267953560.stgit@devnote2> <20220323204119.1feac1af0a1d58b8e63acd5d@kernel.org> X-Mailer: Sylpheed 3.7.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 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Thu, 24 Mar 2022 19:03:43 -0700 Alexei Starovoitov wrote: > On Wed, Mar 23, 2022 at 4:41 AM Masami Hiramatsu wrote: > > > > On Wed, 23 Mar 2022 09:05:26 +0100 > > Peter Zijlstra wrote: > > > > > On Wed, Mar 23, 2022 at 11:34:59AM +0900, Masami Hiramatsu wrote: > > > > Add rethook for x86 implementation. Most of the code has been copied from > > > > kretprobes on x86. > > > > > > Right; as said, I'm really unhappy with growing a carbon copy of this > > > stuff instead of sharing. Can we *please* keep it a single instance? > > > > OK, then let me update the kprobe side too. > > > > > Them being basically indentical, it should be trivial to have > > > CONFIG_KPROBE_ON_RETHOOK (or somesuch) and just share this. > > > > Yes, ideally it should use CONFIG_HAVE_RETHOOK since the rethook arch port > > must be a copy of the kretprobe implementation. But for safety, I think > > having CONFIG_KPROBE_ON_RETHOOK is a good idea until replacing all kretprobe > > implementations. > > Masami, > > you're respinning this patch to combine > arch_rethook_trampoline and __kretprobe_trampoline > right? Yes, let me send the first patch set (for x86 at first). BTW, can you review these 2 patches? These are only for the fprobes, so it can be picked to bpf-next. https://lore.kernel.org/all/164802091567.1732982.1242854551611267542.stgit@devnote2/T/#u Thank you, -- Masami Hiramatsu