Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp88334imu; Mon, 10 Dec 2018 16:47:54 -0800 (PST) X-Google-Smtp-Source: AFSGD/WDPz60NDBvPR/Vyu2g4sIqx14RTXxZ3guVaGtEmeqn+z1Wf0ROogQmWerrf9IJwX0GqCA/ X-Received: by 2002:a17:902:9305:: with SMTP id bc5mr13934289plb.86.1544489273967; Mon, 10 Dec 2018 16:47:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544489273; cv=none; d=google.com; s=arc-20160816; b=h56xnknEbhJ5+Q5IL+3PHfqJ8fzet/BwScRYx/wP1pn+dtDzwIayqkJEQ6JEqzQdpl ootPODge0xp7JcnxwrInCzxQhb1jdN3qXDtxUYvyKq3JI5dUUqDbYqxz6FgLpGIhrs2R G93BGJ36+vtX5olsfLvmwoFegn4ftcDt3SyJ5lDyEBRzEn6QR9WKJxthZCpwUL7DOqh4 z++SGI12PL3vPWmdpxTm+BVTGP4JlKnCzcL22vv+iUUgNu8N/nZwMeVFwCd+5DNOds1Z 8YM8H9HiGp1IpMJUOJkR6ONOsQbU1YeXW0aZqFkPBJBbyaMEXNSOrL8QSOv4V2EQVEFs dzrA== 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; bh=D3nqOd5H0BM+eq4eLOwtq/PW78KtvIEnyOIuSdG7kFE=; b=xHiCjlUzNf77rSRJLdK5nShdtCIB+p2IZv5LCGTC+HXlFawwL+Pr6udlsI/uWiM9xJ EXUXNM8oW1tV4e+anMOhHRFb9VTXH5heTW6I+4RnfIdnRlFEZZP2lLURjlUZfhjH4e22 SWMxBjF3nj62WNuD2yxJGRmwcST0wW0vaPsbYRw+qgvUZIjKZjCikORgeXiNdsX55/7N hivrONrZJcof8M6pykhQFF5ytyMXriAUcR9ky0yIZCWdKdnnNHmps8pUWSpKYGv3H5AL 0fkC7Uxe4Cf5N4jjlasG8fjetGWr2kFvy8miF461VCcBBWxg8xClWptaixguN3dmybNz nNxA== ARC-Authentication-Results: i=1; mx.google.com; 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 g34si11367066pld.15.2018.12.10.16.47.38; Mon, 10 Dec 2018 16:47:53 -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; 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 S1729569AbeLJX6N (ORCPT + 99 others); Mon, 10 Dec 2018 18:58:13 -0500 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:52052 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728409AbeLJX6M (ORCPT ); Mon, 10 Dec 2018 18:58:12 -0500 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512) id 28E3A8073B; Tue, 11 Dec 2018 00:58:06 +0100 (CET) Date: Tue, 11 Dec 2018 00:58:09 +0100 From: Pavel Machek To: Linus Torvalds Cc: Steven Rostedt , Andy Lutomirski , Josh Poimboeuf , Peter Zijlstra , Andrew Lutomirski , the arch/x86 maintainers , Linux List Kernel Mailing , Ard Biesheuvel , 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 Subject: Re: [PATCH v2 4/4] x86/static_call: Add inline static call implementation for x86-64 Message-ID: <20181210235809.GB22352@amd> References: <20181129121307.12393c57@gandalf.local.home> <20181129124404.2fe55dd0@gandalf.local.home> <20181129125857.75c55b96@gandalf.local.home> <20181129134725.6d86ade6@gandalf.local.home> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="JP+T4n/bALQSJXh8" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --JP+T4n/bALQSJXh8 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu 2018-11-29 11:11:50, Linus Torvalds wrote: > On Thu, Nov 29, 2018 at 11:08 AM Linus Torvalds > wrote: > > > > What you can do then is basically add a single-byte prefix to the > > "call" instruction that does nothing (say, cs override), and then > > replace *that* with a 'int3' instruction. >=20 > Hmm. the segment prefixes are documented as being "reserved" for > branch instructions. I *think* that means just conditional branches > (Intel at one point used the prefixes for static prediction > information), not "call", but who knows.. >=20 > It might be better to use an empty REX prefix on x86-64 or something like= that. It might be easiest to use plain old NOP, no? :-). Pavel --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html --JP+T4n/bALQSJXh8 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlwO/ZEACgkQMOfwapXb+vJgBQCgqbl0bzR1o2UMcqonrUj27dbe 5A8An0++oQbTeDDo6wxa0cJu+VcUqiTE =W9W+ -----END PGP SIGNATURE----- --JP+T4n/bALQSJXh8--