Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp2013375ybb; Thu, 26 Mar 2020 19:35:03 -0700 (PDT) X-Google-Smtp-Source: ADFU+vuWPX38MOlYhijd3EQYmkDlFPtbJzRVbOuGCQkf+xtLauzFkasYsLNYdOB+X2f1IFFHFopR X-Received: by 2002:a4a:6841:: with SMTP id a1mr7674581oof.18.1585276503459; Thu, 26 Mar 2020 19:35:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585276503; cv=none; d=google.com; s=arc-20160816; b=LKuGO7LXHLOeiagyoyunL4IUIr6YTMSbatFXar/nOcNhEXMrsEzHGWki3He28u1MEJ Lvxjp0lRt/jIaeylZP7tM6kM96XaNk7z6Rtr8Uv3ZSzXhtxKAXD/Oew3mMg5wi7SorZI p+FUgQGNEzxev/7qdThZgI/ujMA11HwYYBnbfF7E465Jkwu+s1D9+QytOp7FXgFZZDr+ rLIsfJTd1HXQZ49mHsO1No1JqEAPCIpI/c/hrX4fI62Z0Il81fRsSN3QuR4nET+w924V Jn7gdxPbyySqDLavFr5lYoOYWh3EQWMJc2jNOBF3bqKGbMzn49HWEWN2OKYGkjPNJQXt ZvdA== 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:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=Fp7jgLvlqyZSwz34fPuZb+iXtus1SWVdvOsq3zFJpXY=; b=L7xyGYFBqvCDDSzJhvbjW21GuwkM4MhopfK75X+ZkrHFaGNUtKNTOs2tupHuVD5e2S NZgkyhi2JpFYEeSEze893RpISStf20ppz3RZA74TWC7DPRxd3karVPFYNIaDMRCshYL2 vMZz0OqSa+cZvZruis53QFI4gE9kUJ6mekwKGDD4TXDkh3Wr9D62dNP0NEIYy+sXqNxK 2tXoR2PYuz/DC53HaEomFf2kGYzX0QroWRTRIXXcI3LMUrUx8yzX4PV2kmfhjPCyI6Ex p9jdkmxbX1dzLdjHelYFvDQmkwcst5L4foWEniWMc914QRAU81WXf2vR3AvC4fPM2uCq PREA== 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 w16si1707764otl.217.2020.03.26.19.34.51; Thu, 26 Mar 2020 19:35:03 -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; 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 S1728073AbgC0CdH (ORCPT + 99 others); Thu, 26 Mar 2020 22:33:07 -0400 Received: from zeniv.linux.org.uk ([195.92.253.2]:47998 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727600AbgC0CcK (ORCPT ); Thu, 26 Mar 2020 22:32:10 -0400 Received: from viro by ZenIV.linux.org.uk with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1jHemz-003hQq-HR; Fri, 27 Mar 2020 02:32:05 +0000 From: Al Viro To: Linus Torvalds Cc: Thomas Gleixner , x86@kernel.org, linux-kernel@vger.kernel.org Subject: [RFC][PATCH v2 02/22] x86 kvm page table walks: switch to explicit __get_user() Date: Fri, 27 Mar 2020 02:31:45 +0000 Message-Id: <20200327023205.881896-2-viro@ZenIV.linux.org.uk> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200327023205.881896-1-viro@ZenIV.linux.org.uk> References: <20200327023007.GS23230@ZenIV.linux.org.uk> <20200327023205.881896-1-viro@ZenIV.linux.org.uk> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Al Viro Signed-off-by: Al Viro --- arch/x86/kvm/mmu/paging_tmpl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kvm/mmu/paging_tmpl.h b/arch/x86/kvm/mmu/paging_tmpl.h index 4e1ef0473663..5bea4cfe8a15 100644 --- a/arch/x86/kvm/mmu/paging_tmpl.h +++ b/arch/x86/kvm/mmu/paging_tmpl.h @@ -400,7 +400,7 @@ static int FNAME(walk_addr_generic)(struct guest_walker *walker, goto error; ptep_user = (pt_element_t __user *)((void *)host_addr + offset); - if (unlikely(__copy_from_user(&pte, ptep_user, sizeof(pte)))) + if (unlikely(__get_user(pte, ptep_user))) goto error; walker->ptep_user[walker->level - 1] = ptep_user; -- 2.11.0