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 B9A84C25B06 for ; Mon, 15 Aug 2022 15:02:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232322AbiHOPCZ (ORCPT ); Mon, 15 Aug 2022 11:02:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43516 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229727AbiHOPCV (ORCPT ); Mon, 15 Aug 2022 11:02:21 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2E2EE1EAF3; Mon, 15 Aug 2022 08:02:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=ZSXSrb04Cvhz9vI27pIR02EfAkscJlis2igbhxe+mTk=; b=oPu4jQM31XR0NOwZgtR7V+hnCr pBbmQn7D2L7HMNLaw/2d3ZVIPrAETwq+Yf1wz3zHIfN4dDX4BoWsZpeyyRER2OU0izgKRgcRHfj6Y NpDk+Q5ZUNtDJmUxUAHlxN/H7F/ziQW6B+vCf3Y6GKodwuLcNhNr7NgLEpbMwc14PrYZTe7GNl1uz KmfC4xFZhSXkP9cW6VXAyDQyHIsnFlPKBTY4MUnRYIxnC2U8zief8CdomO4ieeaDmOfci4dq7Purh nVOjo4xKw5hY9smdNFz1rRDyBe9gj/y8o2Wo7rt+xNLefIfMnJjKRlR7Tljy06/11KkJu+UVziOkj kO3V/Onw==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=worktop.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1oNbbQ-005o7d-Tv; Mon, 15 Aug 2022 15:02:05 +0000 Received: by worktop.programming.kicks-ass.net (Postfix, from userid 1000) id 7511F980153; Mon, 15 Aug 2022 17:02:03 +0200 (CEST) Date: Mon, 15 Aug 2022 17:02:03 +0200 From: Peter Zijlstra To: Alexei Starovoitov Cc: Jiri Olsa , Steven Rostedt , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Ingo Molnar , bpf , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , LKML , Josh Poimboeuf Subject: Re: [RFC] ftrace: Add support to keep some functions out of ftrace Message-ID: References: <20220722174120.688768a3@gandalf.local.home> <20220813150252.5aa63650@rorschach.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 15, 2022 at 07:45:16AM -0700, Alexei Starovoitov wrote: > On Mon, Aug 15, 2022 at 7:33 AM Peter Zijlstra wrote: > > It is in full control of the 'call __fentry__'. Absolute full NAK on you > > trying to make it otherwise. > > Don't mix 'call fentry' generated by the compiler with nop5 inserted > by macroses or JITs. Looking at: https://lore.kernel.org/all/20191211123017.13212-3-bjorn.topel@gmail.com/ this seems to want to prod at the __fentry__ sites. > > > Soon we will have nop5 in the middle of the function. > > > ftrace must not touch it. > > > > How are you generating that NOP and what for? > > We're generating nop5-s in JITed code to further > attach to. Ftrace doesn't know about those; so how can it break that? Likewise it doesn't know about the static_branch/static_call NOPs and nothing is broken. Ftrace only knows about the __fentry__ sites, and it *does* own them. Are you saying ftrace is writing to a code location not a __fentry__ site?