Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp545593ybg; Wed, 23 Oct 2019 02:06:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqwHA4xKaKw8k+H3hLVrVMgfs9JAwaZVfcb6Yb7JCORB5IUZVyntrFByt8jFL/Ggvpbpy2q/ X-Received: by 2002:a17:906:66c2:: with SMTP id k2mr6700233ejp.1.1571821608004; Wed, 23 Oct 2019 02:06:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571821607; cv=none; d=google.com; s=arc-20160816; b=IngHeCWQ7bqLBe9TAkPXl8xND56E8o1+QeyhtNS8ppQizwCLywvK8ZOxigSj9G1GXd Q66laiqsyb2+0hbD2Ok2wKOJPvq9SO7vAjkck9ptKKk6G09vGE23zqjVyZ2ZoFf3Dcx6 6H/uXAs2gjLE2cRwLui8PU4wgz/O6w4ZRVrMsA19RSu7weFS2s5ocxwKM3wnBW8yQNK6 EF85gqYfTPdPopxUDUyUg/gM+h2735DBQFfeMm/IsV7qRUNTaZpXZojwoQcmIJTsiuYZ N+QJPj3Q44lXCC7mKYqYvbVIl8bQbMm613qY8hVM/Q6yX5ZyS2DG1Y8DUl9AQ7I1rjVr SEPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=i6LtAFOvODnH5XqzqyricMUy+nwnZUTa5qYXhMKnI0Q=; b=itke4QxiZ6dEc7ZIbosbjNr5fAtQHHHfkHlV3V7wrahhHYB5ir0gvWPo7V4phNMga+ wbbrV3mXPsYhKXGvr3WpNIHkZZ/WNfqvTg1qUG1R9hMoXssOPxS9sYZvD5qJBtfJUYH0 tFw7Bpxu/Ahidyp5J3zOAXidaVSvFxZScjouMzT1OZPXqwTsFgRHMcggr9lpboTbtnUm REHfzoEh/VH/3NeZkmbhy7grvBb0AboNRXg0ocjq1hyroZ/Tsati3lnNkcR6xIX88/DQ 3MomFFrJ6a3p2h6VFXkKCpzWhwFzRHLpcMUwfl38DMO6jLmibb9nRjYL6GZQU56pG4br Y76Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=vnM+RvIX; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n23si4250820ejx.103.2019.10.23.02.06.24; Wed, 23 Oct 2019 02:06:47 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=vnM+RvIX; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390530AbfJWJDP (ORCPT + 99 others); Wed, 23 Oct 2019 05:03:15 -0400 Received: from merlin.infradead.org ([205.233.59.134]:46122 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390768AbfJWJDM (ORCPT ); Wed, 23 Oct 2019 05:03:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.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:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=i6LtAFOvODnH5XqzqyricMUy+nwnZUTa5qYXhMKnI0Q=; b=vnM+RvIXEiRs34icSGuaYMfN/ bmUu/35lgSwhyKs6sqSh8ILAiu6qQ5M4Jcjk4M0T6hpUs/hN4gZWVmLOYumADNK1L7p+EpVq60Mod mZJbAjrSp7zlQ16LJpGOc1eki2PJW3zpNs8MDbOz/5PQKi1rqkI9wb55Hu1GShP6OSjMk5fQlRuZn dZwpfmGuJK/WTMWCIPe7f4U1sl6H7M5oHTBguk1lzZj+xhmoL2lEzBwmZIXiZe2aAbZB3Xh5Z/hyM hI+HrbX692hE3PRffO5BHYX/gYafpeOHbpNCevTJ18SR5IeqPpKWjrYIokG6LmiKQe4Orojs+loT+ ondZijbHw==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1iNCXI-0004JV-Gz; Wed, 23 Oct 2019 09:02:32 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id A311130038D; Wed, 23 Oct 2019 11:01:31 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id A265E26539495; Wed, 23 Oct 2019 11:02:29 +0200 (CEST) Date: Wed, 23 Oct 2019 11:02:29 +0200 From: Peter Zijlstra To: Andy Lutomirski Cc: Alexei Starovoitov , Steven Rostedt , Daniel Bristot de Oliveira , LKML , X86 ML , Nadav Amit , Andy Lutomirski , Dave Hansen , Song Liu , Masami Hiramatsu Subject: Re: [PATCH 3/3] x86/ftrace: Use text_poke() Message-ID: <20191023090229.GP1817@hirez.programming.kicks-ass.net> References: <20191022215841.2qsmhd6vxi4mwade@ast-mbp.dhcp.thefacebook.com> <7364B113-DD65-423D-BED3-FF90C4DF8334@amacapital.net> <20191022234921.n5nplxlyq25mksxg@ast-mbp.dhcp.thefacebook.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 22, 2019 at 09:20:27PM -0700, Andy Lutomirski wrote: > Also, Alexei, are you testing on a CONFIG_FRAME_POINTER=y kernel? The > ftrace code has a somewhat nasty special case to make > CONFIG_FRAME_POINTER=y work right, and your example trampoline does > not but arguably should have exaclty the same fixup. For good > performance, you should be using CONFIG_FRAME_POINTER=n. Trampolines and JITs (which both lack ORC data) should always have frame pointers. That way, when ORC fails, it can fall back to FP and we can still get sensible unwinds. See: ae6a45a08689 ("x86/unwind/orc: Fall back to using frame pointers for generated code")