Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2745378imu; Thu, 29 Nov 2018 09:32:40 -0800 (PST) X-Google-Smtp-Source: AFSGD/VnW1d1sQ8u6EegoZLJoorxz/3m+iXf1pnpQJ41XLojMCDNdjfuAAALyKtqhiwyBw0m4XkI X-Received: by 2002:a63:c42:: with SMTP id 2mr805156pgm.372.1543512760326; Thu, 29 Nov 2018 09:32:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543512760; cv=none; d=google.com; s=arc-20160816; b=Li8uposOTNyK41IViVgpYQIcXyB18Clg1INMuUNjlWlSqJ90eMT+atwME5m/2/7KAm p0SkbWpYVe1WKGlfqaO5Ao1BAJcIBFZdsG30hRen7F6Xcu1AGtdZamVUYKj16IWnV/OW /MFGJvLu2/+SheVrRJ3RwMBn7IaxLVkpQjLG8u9WiF/vrBWLBoRSpZLzcsYACYd1UQsY vUUgdpuAewmopHTvwChsKURS5Bu/mrgki4/YlKARmcEDk4DPnWvsGYSqb/cpvaPT3duZ /gTJJtcyfH9VWXKwX8JAblFBW7LXx8hrbsxUqt/8RXDDilobJcJjJVSijgplBfQiggCF AXEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version:dkim-signature; bh=2tQ5huMkLzakExYysCtmqa5Z9VUiuD9pirjYV/w5OS0=; b=0w9NN6joqh6IVPcdEUE6AVg4TiDVD0X+nVeVOjZpD83jyO9y+pRrGnfhB67BKcskR0 MGvid9hiAad21pO1ZT33AZ8tAJ2MN9OdROmDOjZrWXArcO8JJOKoHrqRqSItDI9osxhw kM8cxNbcK5Y/Yj0QXGLj+Sabq7orRPLqU6Caw+q4rszPtVxvO+PHLQeMsqLy1Uemb6ES mMayaLkCHYQhODrhYWpyEiOa+TCucJZRZHczXfpoEfJL6TDh3EjB5wlk3HPAApu+nKl3 GfunU3WUf5dkdJXH2pWoXeumfrUVbksACT9jWDZWyVioh1yBbouAXfehGWh0+oASu5nK swFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amacapital-net.20150623.gappssmtp.com header.s=20150623 header.b=pw1+k+pp; 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 c37si2531197pgb.75.2018.11.29.09.32.08; Thu, 29 Nov 2018 09:32:40 -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=pass header.i=@amacapital-net.20150623.gappssmtp.com header.s=20150623 header.b=pw1+k+pp; 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 S1730017AbeK3EhP (ORCPT + 99 others); Thu, 29 Nov 2018 23:37:15 -0500 Received: from mail-pf1-f193.google.com ([209.85.210.193]:38799 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728588AbeK3EhO (ORCPT ); Thu, 29 Nov 2018 23:37:14 -0500 Received: by mail-pf1-f193.google.com with SMTP id q1so1355105pfi.5 for ; Thu, 29 Nov 2018 09:31:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amacapital-net.20150623.gappssmtp.com; s=20150623; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=2tQ5huMkLzakExYysCtmqa5Z9VUiuD9pirjYV/w5OS0=; b=pw1+k+ppP/qWxqBmXUDWYRmYBPHR8sPhVInoGl/J5tapoWxwEpiblouy+6+D+MWg4j YoctUZ3w8usb+vghH5Koc3+yjtR+KsrSrXIJNw+SXIfdDbaEsgso/KmiLktEemHol9xj BtHLXb8ZKLydtlee+5epF8YkXZDi1AFZFYJGKmNT0f+CZPdl1nU6o6FW+Uaq4phkaU9d h2HltHdbdUX3gCY5vJ7dBuDDgvowwlRXrct2bW25tOkl5CSjv/8fIQy04B8xCBRovbVr oKpkW946nJeprSmz5khX2rwTWxwVsdBp/HdBjLTVPimxIVb7rxb9tBGYT0Sg5oFhpi+j 4O7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=2tQ5huMkLzakExYysCtmqa5Z9VUiuD9pirjYV/w5OS0=; b=QTSl/lftrAFXMOksAkLos8/qp14nrpVFrIyLYp2l2XHTtbWfJWIQTxOfBKEPw1rccm ETAd0Kr/Q9ViUUbgQm8nxpGMntPVq+J1p93tOj+md9ZAF9bpDik0uLVElXfWvUoeN5wf XJmBVap0WH2DhkQyIkqwQmfceJEoKdHgvgcu1ZRIZfSMepE0DBKd6KAOLoxYAJKP4Bz2 llTOoO19PrOdF0Auoa0ejAQugin+Hr87fUdqVWDROUtnMiJrAf/8xBPQ6OhZ8tsUkgtt KRedPx9j4eC+pTCRQCos2KiRrjjUApItl9A8SgK/s1BvbUP56x+ZBYxCAFw4M4aDuHrC z0QA== X-Gm-Message-State: AA+aEWYO8cQgCjzBfON2ChNNNcmmwGLZr5XvsYIdjNfqOVUbp4HMa2W/ ycoFbv0/9iUD8Zko1QOMwPpp4Q== X-Received: by 2002:a62:7a8b:: with SMTP id v133mr2290515pfc.159.1543512666935; Thu, 29 Nov 2018 09:31:06 -0800 (PST) Received: from ?IPv6:2600:1010:b054:ff26:3849:a65d:14d0:f668? ([2600:1010:b054:ff26:3849:a65d:14d0:f668]) by smtp.gmail.com with ESMTPSA id h124sm3485936pfg.143.2018.11.29.09.31.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 29 Nov 2018 09:31:06 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (1.0) Subject: Re: [PATCH v2 4/4] x86/static_call: Add inline static call implementation for x86-64 From: Andy Lutomirski X-Mailer: iPhone Mail (16B92) In-Reply-To: <20181129170742.GC9027@hirez.programming.kicks-ass.net> Date: Thu, 29 Nov 2018 09:31:04 -0800 Cc: Linus Torvalds , Josh Poimboeuf , Andrew Lutomirski , the arch/x86 maintainers , Linux List Kernel Mailing , Ard Biesheuvel , Steven Rostedt , Ingo Molnar , Thomas Gleixner , mhiramat@kernel.org, jbaron@akamai.com, Jiri Kosina , David.Laight@aculab.com, bp@alien8.de, julia@ni.com, jeyu@kernel.org, Peter Anvin Content-Transfer-Encoding: quoted-printable Message-Id: <6C359EF7-B2B6-4FED-96EB-CB7C91918763@amacapital.net> References: <20181126200801.GW2113@hirez.programming.kicks-ass.net> <20181126212628.4apztfazichxnt7r@treble> <20181127084330.GX2113@hirez.programming.kicks-ass.net> <20181129094210.GC2131@hirez.programming.kicks-ass.net> <20181129143853.GO2131@hirez.programming.kicks-ass.net> <20181129163342.tp5wlfcyiazwwyoh@treble> <0A629D30-ADCF-4159-9443-E5727146F65F@amacapital.net> <20181129170742.GC9027@hirez.programming.kicks-ass.net> To: Peter Zijlstra Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On Nov 29, 2018, at 9:07 AM, Peter Zijlstra wrote: >=20 > On Thu, Nov 29, 2018 at 09:02:23AM -0800, Andy Lutomirski wrote: >>> On Nov 29, 2018, at 8:50 AM, Linus Torvalds wrote: >=20 >>> So no. Do *not* try to change %rsp on the stack in the bp handler. >>> Instead, I'd suggest: >>>=20 >>> - just restart the instruction (with the suggested "ptregs->rip --") >>>=20 >>> - to avoid any "oh, we're not making progress" issues, just fix the >>> instruction yourself to be the right call, by looking it up in the >>> "what needs to be fixed" tables. >>>=20 >>> No? >=20 >> Or do you think we can avoid the IPI while the int3 is there? >=20 > I'm thinking Linus is suggesting the #BP handler does the text write too > (as a competing store) and then sync_core() and restarts. >=20 > But I think that is broken, because then there is no telling what the > other CPUs will observe. Does anyone know what the actual hardware semantics are? The SDM is not par= ticularly informative unless I looked at the wrong section.=