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 DB914C25B0D for ; Mon, 15 Aug 2022 15:49:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229627AbiHOPtM (ORCPT ); Mon, 15 Aug 2022 11:49:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37512 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230208AbiHOPtA (ORCPT ); Mon, 15 Aug 2022 11:49:00 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DADE9EE32; Mon, 15 Aug 2022 08:48:58 -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=P5wY5zgg3rjOGWIVZoee4r16o0xMuIGJOZZTb6Q98pw=; b=cGyHTvHgOgGnA3KI+8g9w+XWlt N/0YnVmrgyjEAkR/jU/cyKgYsOOyrOu8Y1c+vunhtZQCKA4ZdEtrEwD49WJf/9QWRc//3g8D4YqVp DXX/ZDLGBSBuP9I1f9ZuRpaPakNRJqj7bxXP3WgvGEgXg7AlktKH1QKAb4LJ39AIDjEAonl3b6REk qgy6llVcH+zA8neTygsz1XUcBAk6uEYaB6363ngNIjhwcJORPC27TiEJcyCaP0gezi2gmdoNUNBAE Knszmkl3DyH4Uo25vNxpDvKNEXFPSo/y0WanxovWiil8U7KbOOXE23CDnyeUIjSlNHOrJepfbTzHt zIIipRlw==; 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 1oNcKb-005q2a-BO; Mon, 15 Aug 2022 15:48:45 +0000 Received: by worktop.programming.kicks-ass.net (Postfix, from userid 1000) id 8613F9801D4; Mon, 15 Aug 2022 17:48:44 +0200 (CEST) Date: Mon, 15 Aug 2022 17:48:44 +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: 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 08:35:53AM -0700, Alexei Starovoitov wrote: > On Mon, Aug 15, 2022 at 8:28 AM Peter Zijlstra wrote: > > > > On Mon, Aug 15, 2022 at 08:17:42AM -0700, Alexei Starovoitov wrote: > > > It's hiding a fake function from ftrace, since it's not a function > > > and ftrace infra shouldn't show it tracing logs. > > > In other words it's a _notrace_ function with nop5. > > > > Then make it a notrace function with a nop5 in it. That isn't hard. > > That's exactly what we're trying to do. All the while claiming ftrace is broken while it is not. > Jiri's patch is one way to achieve that. Fairly horrible way. > What is your suggestion? Mailed it already. > Move it from C to asm ? Would be much better than proposed IMO. > Make it naked function with explicit inline asm? Can be made to work but is iffy because the compiler can do horrible things with placing the asm().