Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2390946imu; Thu, 10 Jan 2019 13:21:57 -0800 (PST) X-Google-Smtp-Source: ALg8bN5eCG1EK28cK47DCBdiS/m3wdSb9/F2W6+p+svZ3b5D5KrPKtTv+XF2FtnYvihR44oNj23N X-Received: by 2002:a17:902:7896:: with SMTP id q22mr12111153pll.280.1547155317380; Thu, 10 Jan 2019 13:21:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547155317; cv=none; d=google.com; s=arc-20160816; b=ZYxG/eg4ny5lV+v5G1chfFzf3Ul5GWohOk9YtSfr3wrnolua2F9/5rqtLlFg7c12uF HUCVQj67R1M610yyKSc2/NtCrewRLqodr8wZdjPdb38VcPbGf61qe/IbKpnzot2Jgams wpIfUs2eliv13yNGf+UEOtxk8FAUzOl94wi0syjDVT7N0o0g7JSDk21wOLSsP/Dx+VPC sRQ+6NL2kWjbmeoBq3tDn8FMykvoTF2x4CpWTAuzF36f/SQ5zwaSO4zkqtowgd/VrKN8 jnNmpvZiyJhpA03Y5LYjslh0SLcKTqTPCsqMWnE2YHE2zVlXXx/xHCrP/5cQ0//z0NPH mLRw== 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=kS+e3Aid9PD2KOCEcBF8gvRBmqCNOwO/L0+AA7MYSeM=; b=kzGGHyxnMxIIVVECBjHrHG7COR7fva8yeuA2RONMILQWH3eCntOJ6PkJ5NTfH4v/Cy njm2J4DPUX48DiwYnQmjcI9WR8vwG3knn2BQn8Qnpqb75dlKX9XnWru3JZEEKycAItLo BlRAyFVVZSQjHhP2GewCZk8eryKVXtxlGF9ipYnGmHQZ/iscyxhA+eGJkeVf3Lz9snRQ pBLnK/56piWZdcAOmZVxZqOxh3yYqvchYJYyPoQs9JS+U4XDNNFvObb22NOV9sZnzgeU eQo87wGixFMlHCP5qPF7Lb1Wp2xd0pwGanivVlnzynMdz7OL1wZwDWGjdwQB6h0u6py+ OQJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=jbtzpFcx; 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 e15si31692750pgg.281.2019.01.10.13.21.41; Thu, 10 Jan 2019 13:21:57 -0800 (PST) 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=bombadil.20170209 header.b=jbtzpFcx; 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 S1730217AbfAJUau (ORCPT + 99 others); Thu, 10 Jan 2019 15:30:50 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:48708 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727665AbfAJUau (ORCPT ); Thu, 10 Jan 2019 15:30:50 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.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=kS+e3Aid9PD2KOCEcBF8gvRBmqCNOwO/L0+AA7MYSeM=; b=jbtzpFcxhY5u7e2NcI7hzFJbE Yf49pU+7QQDDYu/xq4X6oan96lTtd4oGnfSZiBI4OqAg6yg8XgEQWf6IARtg4UIAMmBi32rpbLQtr ExiiXJ0VAKUm0T+oUWgeWFd0MTzjUjzcN4Dhx9yU+7YxrmqjYdKj++oL7RYG8P6dxFWuGGUHt33iW w3Tu4p3kMS5H6/57tnfrPO0oxOAM/zki3QntFxG37R8gh59GpjIMsjus5w91JMnVca9NhmmKTCQo1 52ot5sFBzRc5f9lRG0Jm785DVN5lA0TYDsUlOsd1j6NNplKkxhXticJecOiar3BI2H+6ScACPpGY3 G76/TqpRw==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=worktop.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1ghgyA-0002LZ-Al; Thu, 10 Jan 2019 20:30:26 +0000 Received: by worktop.programming.kicks-ass.net (Postfix, from userid 1000) id 718239844AF; Thu, 10 Jan 2019 21:30:23 +0100 (CET) Date: Thu, 10 Jan 2019 21:30:23 +0100 From: Peter Zijlstra To: Josh Poimboeuf Cc: x86@kernel.org, linux-kernel@vger.kernel.org, Ard Biesheuvel , Andy Lutomirski , Steven Rostedt , Ingo Molnar , Thomas Gleixner , Linus Torvalds , Masami Hiramatsu , Jason Baron , Jiri Kosina , David Laight , Borislav Petkov , Julia Cartwright , Jessica Yu , "H. Peter Anvin" , Nadav Amit , Rasmus Villemoes , Edward Cree , Daniel Bristot de Oliveira Subject: Re: [PATCH v3 0/6] Static calls Message-ID: <20190110203023.GL2861@worktop.programming.kicks-ass.net> References: 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 Wed, Jan 09, 2019 at 04:59:35PM -0600, Josh Poimboeuf wrote: > With this version, I stopped trying to use text_poke_bp(), and instead > went with a different approach: if the call site destination doesn't > cross a cacheline boundary, just do an atomic write. Otherwise, keep > using the trampoline indefinitely. > - Get rid of the use of text_poke_bp(), in favor of atomic writes. > Out-of-line calls will be promoted to inline only if the call sites > don't cross cache line boundaries. [Linus/Andy] Can we perserve why text_poke_bp() didn't work? I seem to have forgotten again. The problem was poking the return address onto the stack from the int3 handler, or something along those lines?