Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp353647imu; Mon, 26 Nov 2018 11:51:26 -0800 (PST) X-Google-Smtp-Source: AFSGD/XHuyapO1qVKXIbrIK+zBYKobtGoeeY+DKnLJIS9994eOd+fDtW8I1CcMMplLHmvJnEpLQl X-Received: by 2002:a63:507:: with SMTP id 7mr22780840pgf.411.1543261885952; Mon, 26 Nov 2018 11:51:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543261885; cv=none; d=google.com; s=arc-20160816; b=Qrq67/aJh9b79msveiSJScG6GNCfP4fMlcVtUWbBJwdRaIKCbGVFKlvHzf5r+N9fay K+4N/uz3k3YTrLjx9f5XC0WkO/3aRUuCvTszuIdqbH2XyMn9ozskTIYg3tbatPycdfmm U7W1DIS+UZ9DAJImmoWwnd2wH0bj4kx88nTrbV5zfl4UbAx4Y7CZIWgOGaskkmT1ZiM0 R2NAA7KiVK48QLrM4W4kkrH9Vpb71BDjpTFltSY4CdIX+UvETcJEpjLtz5dOHhAyXt+e L8E9TyMbtcQJuiFXXQZu4F1a0sDYSjy5EXTtMBgU9nyJauObfzn6xr7n4iQLaA7eCPtT Twtw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=QlDJJK3R1lje6773l6fYl95NYfA4SUB/65JXnNnnWws=; b=GoKPtCc1X0KMSgDG2qwxIxrFqPzFyB40MzBR+tIK/m+x7NsjdN9D69QcUzF7bT6UJD RUvHNT2GzGki+cGUOvFwOifQiwkapJR0vPo9ybjfZap+LI5u8TgBzCWaQLm1jPbEsRt4 RUnp+3EB4ssLZL1mAJShK/VB7xEsZysh7Z7+8hRq1T3YdL0A1HtEa5BJBwDM77zfq+Ub T0bKxBhRRJ5V/UTvB89iIhCx3hK33oxBO7MsLKpTxzJFzhC8w7OAQikrDfcttUI7i08f Nocj0K2FbyUZDgKtpQUMvVMCnylnsuJXXcQt75U9BKd3R2VNpj6lLrOpKq5Oq85+X3QF WVaQ== 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 t3si1180157pgl.108.2018.11.26.11.51.09; Mon, 26 Nov 2018 11:51:25 -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 S1726646AbeK0Gp3 (ORCPT + 99 others); Tue, 27 Nov 2018 01:45:29 -0500 Received: from terminus.zytor.com ([198.137.202.136]:34009 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726253AbeK0Gp2 (ORCPT ); Tue, 27 Nov 2018 01:45:28 -0500 Received: from carbon-x1.hos.anvin.org (c-24-5-245-234.hsd1.ca.comcast.net [24.5.245.234] (may be forged)) (authenticated bits=0) by mail.zytor.com (8.15.2/8.15.2) with ESMTPSA id wAQJngPC1524699 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Mon, 26 Nov 2018 11:49:42 -0800 Subject: Re: [PATCH] x86/fpu: XRSTOR is expected to raise #GP To: Sebastian Andrzej Siewior , Jann Horn Cc: Thomas Gleixner , Ingo Molnar , Borislav Petkov , Andy Lutomirski , kernel-hardening@lists.openwall.com, "Naveen N. Rao" , linux-kernel@vger.kernel.org, x86@kernel.org References: <20181126172706.184008-1-jannh@google.com> <20181126174945.r2ubrlg2gzwog2ez@linutronix.de> From: "H. Peter Anvin" Message-ID: <4d4c4f1f-72e3-0182-151e-8bd455ccd143@zytor.com> Date: Mon, 26 Nov 2018 11:49:37 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.0 MIME-Version: 1.0 In-Reply-To: <20181126174945.r2ubrlg2gzwog2ez@linutronix.de> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/26/18 9:49 AM, Sebastian Andrzej Siewior wrote: > On 2018-11-26 18:27:06 [+0100], Jann Horn wrote: >> commit 75045f77f7a7 ("x86/extable: Introduce _ASM_EXTABLE_UA for uaccess >> fixups") incorrectly replaced the fixup entry for XSTATE_OP with a >> user-#PF-only fixup. However, XRSTOR can also raise #GP when the supplied >> address points to userspace memory. Change it back. > > The #GP is raised if the xstate content is invalid. But I guess the > details don't matter. > >> Reported-by: Sebastian Andrzej Siewior >> Fixes: 75045f77f7a7 ("x86/extable: Introduce _ASM_EXTABLE_UA for uaccess fixups") >> Signed-off-by: Jann Horn > Acked-by: Sebastian Andrzej Siewior > It does matter -- please correct the patch description, or we might have some serious confusion at some arbitrary point in the future with the result that the bug gets re-introduced; it would not be the first time. -hpa