Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp945877ybm; Fri, 29 May 2020 16:30:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwwiPuiLuPeZ6LdRd3c12EWD4gPqINuIatZaeBq5slTfS31/X5lgdTeIKGLSE+SOGa0vtgY X-Received: by 2002:aa7:d6d1:: with SMTP id x17mr11007593edr.257.1590795004647; Fri, 29 May 2020 16:30:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590795004; cv=none; d=google.com; s=arc-20160816; b=rDjCkNZk/OCAAzIk3nk/hxvoO/h5OkHO1Y+XZVEUwvDNUZ/J1re9Y6R/g40bB6wlFd u9dNFbDu+6oDzoVb04aNSewawhq8u6XqEo75K7pVHtlGYL+2wK0J2mS0E14VntcxrPNm 2bhaB5oh4Uoy1f1jq2f7LbSl4KMWr51GNAZsZB4ct08rtsYxeqwndLsuxxwggPjR8EGg IUHAG+n1Izy+5qzKM/eHx82Z+QL679sW/O6mrqvpg1Uvbe9pnnCcyYrDmfIiHQNJ49wX YvJhiaDxAZVpsuD/yIFGHEps8WCSXHWZYYHFRdJ6t0I+kqJPIw7i50OCZZ3THtdiSa4n XV/w== 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=K2HFtwSGEMqe4jVz3cuflRXfvP3nWqCgadhK5t4e4+s=; b=mmEceo2PtdXRs9RPjO8aBWw5lo3QdEfSksStILQiqEZSkHOF7CHXb5I1K8JV7vreru kqvrqgWsAV1mSAdX7A8O+zTAY92QHip7oaiDxIKsQ+baFp6maxScH1s32B7w3Paniedl txPKaFr4bB36qBNgcTiqNHsx+ENL8D676xGvOzcnDjifbJQttAfFk6Cvjsj9AnyaLahT 7/XDeKMNUEoq0KKz3CTRPQxBpTfjaKNDoUtTYCRuYTsm74Lek0IIWcmx/cvp/gL8MOwY af8cxMKmAeGUOxOXaUlnhDSAcCWLJ3Fqmt3zGThwPiyqNDig09Jltzmrh634gkKOmPN8 R9UA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id lu3si6679393ejb.305.2020.05.29.16.29.42; Fri, 29 May 2020 16:30:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728638AbgE2X1p (ORCPT + 99 others); Fri, 29 May 2020 19:27:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39870 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728536AbgE2X10 (ORCPT ); Fri, 29 May 2020 19:27:26 -0400 Received: from ZenIV.linux.org.uk (zeniv.linux.org.uk [IPv6:2002:c35c:fd02::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EFCBEC08C5CA; Fri, 29 May 2020 16:27:25 -0700 (PDT) Received: from viro by ZenIV.linux.org.uk with local (Exim 4.93 #3 (Red Hat Linux)) id 1jeoPM-000BiA-AQ; Fri, 29 May 2020 23:27:24 +0000 From: Al Viro To: Linus Torvalds Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: [PATCH 8/9] x86: kvm_hv_set_msr(): use __put_user() instead of 32bit __clear_user() Date: Sat, 30 May 2020 00:27:23 +0100 Message-Id: <20200529232723.44942-8-viro@ZenIV.linux.org.uk> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20200529232723.44942-1-viro@ZenIV.linux.org.uk> References: <20200528234025.GT23230@ZenIV.linux.org.uk> <20200529232723.44942-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/hyperv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kvm/hyperv.c b/arch/x86/kvm/hyperv.c index bcefa9d4e57e..b85b211d4676 100644 --- a/arch/x86/kvm/hyperv.c +++ b/arch/x86/kvm/hyperv.c @@ -1129,7 +1129,7 @@ static int kvm_hv_set_msr(struct kvm_vcpu *vcpu, u32 msr, u64 data, bool host) * only, there can be valuable data in the rest which needs * to be preserved e.g. on migration. */ - if (__clear_user((void __user *)addr, sizeof(u32))) + if (__put_user(0, (u32 __user *)addr)) return 1; hv_vcpu->hv_vapic = data; kvm_vcpu_mark_page_dirty(vcpu, gfn); -- 2.11.0