Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp5412270ybe; Tue, 10 Sep 2019 03:20:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqw97VG+ptC70yp8bQHPt8crOncmnp+8WJdmWxDvySyQ+OsbkCT28WTc6EJIQ0MwYm0lyIJY X-Received: by 2002:a17:907:111b:: with SMTP id qu27mr24196792ejb.10.1568110811480; Tue, 10 Sep 2019 03:20:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568110811; cv=none; d=google.com; s=arc-20160816; b=s+KKN9+Ao8bRJQKVzZp4G3ZBcoIYZ4RKWZ4oLoULN/3zmec+4CIzvfRz6h1Q8JbFYw 1wgn4ObXG/txpRTilkccYK/WOPZ1h6QUcDX2T9zw79Gn1S1rSNH5yv8oMw6ySwq22fvx k5j90wtseYF/gSbI5Dzx60Re3DKUtVk22UIM85sYQijpOwgfg2TeaYJRoJaxmwXlGhOy qzYxZZL2QdQebY+dQTiApKnfREtFMIXhfa5a88pxYT3ADBzu+47RiHKwLaG3wUs8POyo IFokZMWtfpjPVq51xr9/wL1zNlaaOSFY07rIDPIPaeqqUOdg15CliHKvxbqIBQFrKngy Z26Q== 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=9KscsWAaBE1jNLn+Rl6HyrO5x40q+4spa6O3IhEemW8=; b=e5eEEJ5+aexBStZq7I2IuBGpWVhFPm1pOjS5A99lGeGXHZb/u+IGKoKNoraxDeZxT0 vdKKFcJCASM/iiAT13Go3a/R89ayK4j7kOSDWdtT/Q4EsBHmSuHYggI7nOh6YjxwyvEB YViEcs9zBzb+1Ww19fnhfbljAKattJlh2NqQcUpfhB8Bbzaqt5wobjUamWGgJD0RYo9k 81YqNYLreJyYh+rB3SnRL8vrDB4+yoSDtRp0R5v2lQyiyH+HShJ/IqybnTHVxkwhXEaF 2iPeHOmrGdk1yM7fwoLIRcvMf/vPM6Z0TmoNScoWyZSe9vBmaGDp7HRYbxsBVrLkvHRl /JlA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@codeweavers.com header.s=6377696661 header.b=ZSKBUntz; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=codeweavers.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u4si4511540edp.447.2019.09.10.03.19.47; Tue, 10 Sep 2019 03:20:11 -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 (test mode) header.i=@codeweavers.com header.s=6377696661 header.b=ZSKBUntz; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=codeweavers.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389055AbfIIWeg (ORCPT + 99 others); Mon, 9 Sep 2019 18:34:36 -0400 Received: from mail.codeweavers.com ([50.203.203.244]:54140 "EHLO mail.codeweavers.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389010AbfIIWeg (ORCPT ); Mon, 9 Sep 2019 18:34:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=codeweavers.com; s=6377696661; h=To:References:Message-Id: Content-Transfer-Encoding:Cc:Date:In-Reply-To:From:Subject:Mime-Version: Content-Type:Sender:Reply-To: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=9KscsWAaBE1jNLn+Rl6HyrO5x40q+4spa6O3IhEemW8=; b=ZSKBUntzMqekIqdvviTztD4gS fkTNNLm6wtkTBXwaU7DwIRNVgk5FHBxPO5Qd5yrQXOWGzgbbumsyUfKx+FagwKgNpmVYDAoaSAlfq VbMB0zqFaGHdazhNhw7bxV8xb8c49lsDz1vgn/RTl4drn1CzrWdlaOuz4WiSf8FFBsi6M=; Received: from cpe-107-184-2-226.socal.res.rr.com ([107.184.2.226] helo=[192.168.2.132]) by mail.codeweavers.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1i7SEx-0000Es-SN; Mon, 09 Sep 2019 17:34:32 -0500 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: [PATCH] x86/umip: Add emulation for 64-bit processes From: Brendan Shanks In-Reply-To: <20190907212610.GA30930@ranerica-svr.sc.intel.com> Date: Mon, 9 Sep 2019 15:34:28 -0700 Cc: linux-kernel@vger.kernel.org, Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , x86@kernel.org, "Eric W. Biederman" Content-Transfer-Encoding: quoted-printable Message-Id: <317243DA-3BAE-4620-8E31-5F23145DD992@codeweavers.com> References: <20190905232222.14900-1-bshanks@codeweavers.com> <20190907212610.GA30930@ranerica-svr.sc.intel.com> To: Ricardo Neri X-Mailer: Apple Mail (2.3445.104.11) X-Spam-Score: -106.0 X-Spam-Report: Spam detection software, running on the system "mail.codeweavers.com", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: > On Sep 7, 2019, at 2:26 PM, Ricardo Neri wrote: > > On Thu, Sep 05, 2019 at 04:22:21PM -0700, Brendan Shanks wrote: >> >> if (umip_inst == UMIP_INST_SGDT || u [...] Content analysis details: (-106.0 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -100 USER_IN_WHITELIST From: address is in the user's white-list -6.0 ALL_TRUSTED Passed through trusted hosts only via SMTP Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On Sep 7, 2019, at 2:26 PM, Ricardo Neri = wrote: >=20 > On Thu, Sep 05, 2019 at 04:22:21PM -0700, Brendan Shanks wrote: >>=20 >> if (umip_inst =3D=3D UMIP_INST_SGDT || umip_inst =3D=3D = UMIP_INST_SIDT) { >> + u64 dummy_base_addr; >> + u16 dummy_limit =3D 0; >> + >> /* SGDT and SIDT do not use registers operands. */ >> if (X86_MODRM_MOD(insn->modrm.value) =3D=3D 3) >> return -EINVAL; >> @@ -228,13 +228,24 @@ static int emulate_umip_insn(struct insn *insn, = int umip_inst, >> else >> dummy_base_addr =3D UMIP_DUMMY_IDT_BASE; >>=20 >> - *data_size =3D UMIP_GDT_IDT_LIMIT_SIZE + = UMIP_GDT_IDT_BASE_SIZE; >=20 > Maybe a blank line here? Adding a blank line in place of the removed line? I=E2=80=99m not sure I = see the need for it, there=E2=80=99s already a blank line above, and = it's followed by the block comment. Brendan=