Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp4005299ybb; Mon, 23 Mar 2020 11:40:37 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtAlzeFY05hF1EuiHCFFiOxCPhatlULrqfX0yROShRSRiNZFnFnsuiKdBdOhLXhA5Via/Px X-Received: by 2002:a9d:64d4:: with SMTP id n20mr18023274otl.193.1584988836630; Mon, 23 Mar 2020 11:40:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584988836; cv=none; d=google.com; s=arc-20160816; b=ad1ZZlZCGJy5EQC8THVuLIC60V1Fk+YjwXz4YSqmz5+uOBgQtotMCFltUJ8cfW+JYA dKQFmfGB+xiXeKNvuVQsMn8/453jtlRnAiQ53pYioIAxmgriHMwaHsh3hBPD9dojJtDO kBZsMyG9EgvSkWp8fssx4hPwElto4efZu7PYT320f+qIsje0MoRuNSfoh6bC7o0s0k8Y IcSKHAGcOOhEFshAKM27IKwVUEY4Z4ZWWcnfqLIIyMkPzG8KOpox3Q4NgSktnVuopapS wezMis5KDhAsY0LoAmCRY/9WuuKaNQNRIvNlCOf1I85CeCIq5ASB8CeICx9hzR0DkKaZ wTnQ== 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=OISWLM3NN8xW448ShHcI/4w3eIl3+QOdYoLRjJc1uf60F3korqfw0791/FKBb/3npt g+ynTXiaHSYiL6xScfb2s1RcYmJbB28xY6V3tfvemOms9FQjFh8ssrRIVlAe/LyeHuWq QJd+vb4ZaHTjnHvQrrJYRx7bPLQMBqGaUQdsQG13JJHwP3vdrY4WffFU495YMS2bW+c1 lqX7Q9f1sC4OcSVUD7eJiVgbr+PACqir0+mglb9VvFHf/ytrPUotUbXzE1xG1KfenV0b CJPsJbpb4MI7aqDg04zW2GjXqOe9PVt3rJV3r7MPceq6KUVM+c7qOYNl0wmcpzJ8uhOF EbyQ== 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 l131si7858155oih.10.2020.03.23.11.40.24; Mon, 23 Mar 2020 11:40:36 -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 S1727558AbgCWSiX (ORCPT + 99 others); Mon, 23 Mar 2020 14:38:23 -0400 Received: from zeniv.linux.org.uk ([195.92.253.2]:46638 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726643AbgCWSiW (ORCPT ); Mon, 23 Mar 2020 14:38:22 -0400 Received: from viro by ZenIV.linux.org.uk with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1jGRxs-00134y-4l; Mon, 23 Mar 2020 18:38:20 +0000 From: Al Viro To: Linus Torvalds Cc: Thomas Gleixner , x86@kernel.org, linux-kernel@vger.kernel.org Subject: [RFC][PATCH 02/22] x86 kvm page table walks: switch to explicit __get_user() Date: Mon, 23 Mar 2020 18:37:59 +0000 Message-Id: <20200323183819.250124-2-viro@ZenIV.linux.org.uk> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200323183819.250124-1-viro@ZenIV.linux.org.uk> References: <20200323183620.GD23230@ZenIV.linux.org.uk> <20200323183819.250124-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