Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp2108389pxb; Fri, 25 Mar 2022 11:13:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyhM5Y54Tb+Onu4dQA+N1kSf/5Cm/9t7OeK44HAm422ayTMDlyTzx9wkqYSlBMXuG//qFwx X-Received: by 2002:a63:2051:0:b0:382:9ad9:d8ff with SMTP id r17-20020a632051000000b003829ad9d8ffmr653829pgm.454.1648232023904; Fri, 25 Mar 2022 11:13:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648232023; cv=none; d=google.com; s=arc-20160816; b=IEQijPTZMFUJ3JknXHQe7I4cvC9LeMCfYVQq/8tj3w1zJWpmsqzNdocXMOtrDqRNuH TAG3cuJxL0BrIaxDAEM9X23LKmyy/lp8z2EKcwKUpL/hV7vwRv76Yd5BYOWqdFcdDmXV AkThhcw9R/AZkq7oTie7Wk/Av1D3Ma8lMaiYaibTAGZV2W8CqzSNjDmUhBmhbLbfFVwE aCCGIN9dMjHde3gjb9lISJQj+nOxvZVgspsHPOplzynbCNiuk1zuZqv/TpUH3rihkZTK idbP4fXXNjhKPtgUDW/k1kuDjLC4JKAbZGaUtCf9rhCB7ilnp5fd0S7hYwQzsD9nJfsf hHzA== 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=EAHjCwgp1rod9VeW7QhURJ9rXJKAB3b7TizJo/0bFEw=; b=GgSwTFuGWej4VvP5IIkxC19vGtai8ZfJxpbC75zDj9bMe6/35FaZvTLYfAfq8LmG6V nDfXcIufU/n1aqgtP4l11wUzCKzpVFx7XxH56UBrnZwgmPhykMMoYULOSaZpmwdpSGb3 r7NdKqe7d6HZGks5ou3XrJM4DP5FmV+D5LctY8EW18zTEkWpgv0a9MmUYOkeSvRBoOWL rdz7GdqzKKJK7FLv7uXEQUHpoYBh+yFakWImRhtGFlw4N2L/mRti35L/pI4MRyOOloeG RPd0m/mcZGctTsNJpISJ96UmO8NmVClfj55zzLk1FRVassyB/tNlM52uA26xRt03NM4q jKqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=s4Lkbsk1; 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 y191-20020a6264c8000000b004fa3a8e0062si3322689pfb.281.2022.03.25.11.13.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Mar 2022 11:13:43 -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=s4Lkbsk1; 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 B096864F4; Fri, 25 Mar 2022 10:43:51 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241883AbiCWFo3 (ORCPT + 99 others); Wed, 23 Mar 2022 01:44:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49338 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229870AbiCWFo2 (ORCPT ); Wed, 23 Mar 2022 01:44:28 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C9D339FF4; Tue, 22 Mar 2022 22:42:58 -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 65C4861005; Wed, 23 Mar 2022 05:42:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 920F9C340E8; Wed, 23 Mar 2022 05:42:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1648014177; bh=oVYHNw62hSMNdVg5hD9UB13JLJULBnj8IoZ38rPtinU=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=s4Lkbsk1m1hffCQrS0J/wB2E6SRuGlqVI4hRHcI0Yd+jdd5d4iQld7HL4g1UBl+/X 5lnK1+W5DOLR9/P6ywlYZmyK/EqVZieZijatKiwtMsBFnMwU19LNcFGSzoth/Vq3R9 YM/mB6cfi3B+dx0WDqqzkx5FgamaubgUw96qs0r/sMGGODki5GOWkAnN0pMt1mjhY5 pma016kEeXGQ1vLsK/E7zaXFBAYFng3KN94PChRHJCOY/Fa9YQch37C+8xgL1xbtNW XYeWem4xdeyew+WYM4vdG0q/Rd6ws4uz0qKX0Y3VvNZzpugKnmumrfghAPsk/7EOUq ffEekYOw2vItg== Date: Wed, 23 Mar 2022 14:42:48 +0900 From: Masami Hiramatsu To: Masami Hiramatsu Cc: Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, Peter Zijlstra , Jiri Olsa , Alexei Starovoitov , Andrii Nakryiko , Daniel Borkmann , Andrii Nakryiko , netdev@vger.kernel.org, bpf@vger.kernel.org, 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 0/1] fprobe: Introduce fprobe function entry/exit probe Message-Id: <20220323144248.9bccc3051bae40a85981c14e@kernel.org> In-Reply-To: <164800288611.1716332.7053663723617614668.stgit@devnote2> References: <164800288611.1716332.7053663723617614668.stgit@devnote2> 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 Hi, The title is not updated. It should be; rethook: x86: Add rethook x86 porting (drived from "fprobe: Introduce fprobe function entry/exit probe" series) Thank you, On Wed, 23 Mar 2022 11:34:46 +0900 Masami Hiramatsu wrote: > Hi, > > Here is the 13th version of rethook x86 port. This is developed for a part > of fprobe series [1] for hooking function return. But since I forgot to send > it to arch maintainers, that caused conflict with IBT and SLS mitigation series. > Now I picked the x86 rethook part and send it to x86 maintainers to be > reviewed. > > [1] https://lore.kernel.org/all/164735281449.1084943.12438881786173547153.stgit@devnote2/T/#u > > Note that this patch is still for the bpf-next since the rethook itself > is on the bpf-next tree. But since this also uses the ANNOTATE_NOENDBR > macro which has been introduced by IBT/ENDBR patch, to build this series > you need to merge the tip/master branch with the bpf-next. > (hopefully, it is rebased soon) > > The fprobe itself is for providing the function entry/exit probe > with multiple probe point. The rethook is a sub-feature to hook the > function return as same as kretprobe does. Eventually, I would like > to replace the kretprobe's trampoline with this rethook. > > Thank you, > > --- > > Masami Hiramatsu (1): > rethook: x86: Add rethook x86 implementation > > > arch/x86/Kconfig | 1 > arch/x86/include/asm/unwind.h | 8 ++- > arch/x86/kernel/Makefile | 1 > arch/x86/kernel/kprobes/common.h | 1 > arch/x86/kernel/rethook.c | 121 ++++++++++++++++++++++++++++++++++++++ > 5 files changed, 131 insertions(+), 1 deletion(-) > create mode 100644 arch/x86/kernel/rethook.c > > -- > Masami Hiramatsu (Linaro) -- Masami Hiramatsu