Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp2128747pxb; Fri, 25 Mar 2022 11:35:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzr2G55gKVKXjtx8ethWH2T11q8g5Qnvi4Rod0SD7GWCinQ158ZNoeZNMp0jLdka55Y+0Im X-Received: by 2002:a17:90a:dd46:b0:1b8:8:7303 with SMTP id u6-20020a17090add4600b001b800087303mr26205094pjv.197.1648233322325; Fri, 25 Mar 2022 11:35:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648233322; cv=none; d=google.com; s=arc-20160816; b=NMbu+KrzFBZVbhx8QFU/pQOnwybmw16icBZzyfBWXNDffwqRpul4xwNxcqy8EPR0NB Hu7bJLpp/57SdfrgUChm2KCywdeI5YpGMeNt/T0jV84KWJb/GseOqpnJV+zt87kdV7Pm lZj1K7yVaNoIFwgqgR2GsS+VzGlhhP412uIlniSPbUBEQq+u76gDCEYXYAjK6cnUtUx/ TUPuWEUMKFJgmNMhBkI3ca1AQ8cQd5pfFXs/Kf6tua3dVM5sczg2rTeEsyP+HpZZ23nj yjPCo0aAqqRhTDlH6HQcHyJaXh1UC0TCNSEUgPHAlbOO+sNbK3PDvmeIcsXVhECwoiIZ WgrQ== 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=QIOZWYnlLTsLv6udx7gOPxAHW2SzfUgIl4CM5CRpNIk=; b=Epa3QnXEnySrTKqdZdUDba2metpGDt/Wt5daRCQZYOiQu+kqJi+1gibPabsiIX+NPM aWm0aa4ZeUNaXcwy4OeWGyISLFQK1KLmAmD2rEulcIzTfuKREZgXWVAFkm+Jrwy/CP2i qQOBdximPiCfqcqLQr1AUPydmOm/I0B2X7ctXrm58QWFMl2eWC4jJiBdq+U5FwU/NWfI Xa4+0ecOEudh4FKaPxHasdNCGBEHf9p1yj4DQOavlU9rfsNKB7YmfeGXDLHcLwdy62Jd T1k4Vma9MJwTfz49NZwk5/4546S5Ymh1dbDzVMEay0qC97+ygaK4gl78UgPaxTbyLxaW hDqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=l51ZcZz9; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id u192-20020a6279c9000000b004fa3a8dffc4si3278672pfc.123.2022.03.25.11.35.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Mar 2022 11:35:22 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=l51ZcZz9; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 00D13188A2C; Fri, 25 Mar 2022 10:55:14 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1356596AbiCYCXD (ORCPT + 99 others); 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 X-Spam-Status: No, score=-3.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, NICE_REPLY_A,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 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