Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp475834imu; Fri, 11 Jan 2019 03:50:59 -0800 (PST) X-Google-Smtp-Source: ALg8bN5meYC9CwVSv7DHtn7YBDkpxMZqbEGEF13yLUNIqsbfALyqSwxdKjFXThLARvDDKpYAtflc X-Received: by 2002:a17:902:4464:: with SMTP id k91mr14526488pld.13.1547207459602; Fri, 11 Jan 2019 03:50:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547207459; cv=none; d=google.com; s=arc-20160816; b=K86khD/J+4qXwEoTgK1Flx+y3HIJfWtAXpisWs0BKa8jGr5RM1SMcj+FoRBPx8VyPH fq97PBvOyf9f+mKgGfM3Sk+XbwG0Br+1bPs3U8hvWdoXHx5JLz2xxn7ZZyLZm7FK0aeA rgX3B1QGnUcBy9/uINYkdx2MsJ5SqjKQ6gkJSXMi9F0Prrt8sSCZL5TiYxIsYlXZ0Nz1 NjpV8kybt6O1PPoEFx+//Lciy4MwPbl8qEdtBynNqGcv77O/yn9jN0YDcDOHD3EkCFK8 S5NuKIStfKS6PXNzs2UOjeUclegfulG6YcH/GSfO3JP86KHOpp62r2N4mxAvkQj4c1j0 svgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:from:cc:to:subject :content-transfer-encoding:mime-version:references:in-reply-to :user-agent:date; bh=Stg8t14NDnpybzMclEATwthfPKZw8eyRUmDpwkBTrmQ=; b=qaHNypOtkRNqd/TaGk8h+9Sg/vFLcE/CEtrnnmJh5xqCXJyv7GUIacJNb3IzjHn0kr j3Tf4fcVi+2RBdVx35kDJkhZF3/s76q7FCCkYmmGtStr5UA1XTzH8HxTB8eHgt6tbIfB KsTXAdzZEyX+TWt8+hOBXjgkuWaf2Ej1AC/ow5uaIlZi1OFfdb4nAEJ5Lga4NjljcCE1 qZmZjGTBBI835WQ2+8Sedx6Dsz0RVo9m9/5X0Uv6sHD88sSHiMjsAQ5vqdZQyrQg3NBO 8oD+frbQhn6cK6KbDa4JH9rZCIjkRrxmD8qpGGIfnEaKWOwWwkLTUPUPNPbuuhxEc7gX kqXQ== 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 a12si8897400pgk.291.2019.01.11.03.50.44; Fri, 11 Jan 2019 03:50:59 -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 S1730030AbfAKIOU convert rfc822-to-8bit (ORCPT + 99 others); Fri, 11 Jan 2019 03:14:20 -0500 Received: from terminus.zytor.com ([198.137.202.136]:54813 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728637AbfAKIOU (ORCPT ); Fri, 11 Jan 2019 03:14:20 -0500 Received: from [IPv6:2607:fb90:3626:b003:4cfb:2561:b6b1:b594] ([172.58.37.146]) (authenticated bits=0) by mail.zytor.com (8.15.2/8.15.2) with ESMTPSA id x0B8D8ht569393 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Fri, 11 Jan 2019 00:13:09 -0800 Date: Fri, 11 Jan 2019 00:13:00 -0800 User-Agent: K-9 Mail for Android In-Reply-To: <20190111013421.GD2365@linux.intel.com> References: <279b8003f7f0a6831d090ab822d37bc958f974de.1547073843.git.jpoimboe@redhat.com> <8138A1EE-359D-4CD2-8E96-5BF00313AB3B@vmware.com> <20190110172004.wuh45xoafynfm2df@treble> <20190110123243.3b9e0856@gandalf.local.home> <20190110174257.GE16556@linux.intel.com> <1955E727-BF68-4C00-A8C2-54FA9487A5A6@zytor.com> <20190111013421.GD2365@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT Subject: Re: [PATCH v3 5/6] x86/alternative: Use a single access in text_poke() where possible To: Sean Christopherson CC: Steven Rostedt , Josh Poimboeuf , Nadav Amit , X86 ML , LKML , Ard Biesheuvel , Andy Lutomirski , Peter Zijlstra , Ingo Molnar , Thomas Gleixner , Linus Torvalds , Masami Hiramatsu , Jason Baron , Jiri Kosina , David Laight , Borislav Petkov , Julia Cartwright , Jessica Yu , Rasmus Villemoes , Edward Cree , Daniel Bristot de Oliveira From: hpa@zytor.com Message-ID: <5DD129EB-3EEF-479E-98BB-DFCAD999DC2D@zytor.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On January 10, 2019 5:34:21 PM PST, Sean Christopherson wrote: >On Thu, Jan 10, 2019 at 04:59:55PM -0800, hpa@zytor.com wrote: >> On January 10, 2019 9:42:57 AM PST, Sean Christopherson > wrote: >> >On Thu, Jan 10, 2019 at 12:32:43PM -0500, Steven Rostedt wrote: >> >> On Thu, 10 Jan 2019 11:20:04 -0600 >> >> Josh Poimboeuf wrote: >> >> >> >> >> >> > > While I can't find a reason for hypervisors to emulate this >> >instruction, >> >> > > smarter people might find ways to turn it into a security >> >exploit. >> >> > >> >> > Interesting point... but I wonder if it's a realistic concern. >> >BTW, >> >> > text_poke_bp() also relies on undocumented behavior. >> >> >> >> But we did get an official OK from Intel that it will work. Took a >> >bit >> >> of arm twisting to get them to do so, but they did. And it really >is >> >> pretty robust. >> > >> >Did we (they?) list any caveats for this behavior? E.g. I'm fairly >> >certain atomicity guarantees go out the window if WC memtype is >used. >> >> If you run code from non-WB memory, all bets are off and you better >> not be doing cross-modifying code. > >I wasn't thinking of running code from non-WB, but rather running code >in WB while doing a CMC write via WC. Same thing. Don't do that. -- Sent from my Android device with K-9 Mail. Please excuse my brevity.