Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp1548050ybm; Sat, 30 May 2020 12:23:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwPx5GlUCqkHaHbSbItSsYk21CDIqmc4wbg+QIKN67gpxiW+CQvavv3YlMraJu7mwvnfSmS X-Received: by 2002:a17:906:31d2:: with SMTP id f18mr2792515ejf.110.1590866621283; Sat, 30 May 2020 12:23:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590866621; cv=none; d=google.com; s=arc-20160816; b=cRVjx626XTjTCPwIVJ8zaV/SOZQDSadflV8zjIicj9h9zr9aU8cv/Jx3reoqqP/J17 4R7iemYfLOI9kPxjzpOnItmwMhYYSZXKkUKHSvwwc2OSWVZ5Ds+sOMGuTKy1MOq48pUr SgheYR07ZhRVPZFiiHvt8CzCRKty/3dpAGZNGmvSaYRtiiioH9MJmgham2V3sJHuZO7d ea6+Scj0McC0HyVkm4pV6GRaLbTm5FrSb9Mq2gHDMa1KjanictvMRh55VLz6pGA3Sfka b3u/OW1zcokwfsFD7VEzVfzGUN9DP0UJ/th4kOfWYA9oZ0ceBn5bcIiGuf/ENNaML3i3 LEXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=6NkuvZ5wxpI0d7nxM1p2cSrZBIeJuPPcRbcbjWmyFH8=; b=I2sdYV1O3W60a9iuivS9IBIlojjUBag+/GtIOhIPty4vruxS7EchXh7WVhlMSsI+LT L2zkgnEbar3Br9K4YZkadAIWAZ8kcJBFR2QUDoEHWklPjda0Mfdy/WFAXSlKOK8oup/u 8Gm+rA+w81iqd73ZJOCJ85j8dO0zxdKJYEaYQjlP9lSRHVB0Zf5iv1QnJBa3EWCvWXi8 SLw38BJt5VIpDvJZ1HQHOD+B8UfDkCo3QMvb3sq99DUx/T91iHE46HT+Qs4hOHOFQGbW i4XoLfnTFjhzK0ufv33zFzk+AcMKIe4Xn/Fbf10b5Kse+/aPi9uXP4yIVnUcf5C41xlf O91Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=L2gQT40o; 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 x6si7439997edq.147.2020.05.30.12.23.17; Sat, 30 May 2020 12:23:41 -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; dkim=pass header.i=@linux-foundation.org header.s=google header.b=L2gQT40o; 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 S1729317AbgE3TVP (ORCPT + 99 others); Sat, 30 May 2020 15:21:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55800 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729090AbgE3TVO (ORCPT ); Sat, 30 May 2020 15:21:14 -0400 Received: from mail-lf1-x142.google.com (mail-lf1-x142.google.com [IPv6:2a00:1450:4864:20::142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 36EEAC08C5C9 for ; Sat, 30 May 2020 12:21:14 -0700 (PDT) Received: by mail-lf1-x142.google.com with SMTP id e125so1665522lfd.1 for ; Sat, 30 May 2020 12:21:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=6NkuvZ5wxpI0d7nxM1p2cSrZBIeJuPPcRbcbjWmyFH8=; b=L2gQT40oxwSdo4IdQediVzzXaQ9+LxXAgiK+MMr6jElRXz3IKpxvX2gNiIHXz8954v HtaR/MNXCphqAEFosDyOPCVSqQ3rs19dQLOuWT74IQyI0O7DyzRaJ/4J+KBp/TRoPDSz g1kWwuqmvYPoA233IXW/7crOLzFd3q6p7ha5U= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=6NkuvZ5wxpI0d7nxM1p2cSrZBIeJuPPcRbcbjWmyFH8=; b=b5dA926KYTOU6lUG5zeo1Fztkt8bHO47ONB1pqnwoqR83KT8nu+EDuP6rK/oHjKvwa XuafDFCRXnxkJ2o+AiIhNCspCGva8Z9DXz4tL0EDanf/yYC5/1X0X8k75LlnXTFqJ5xV fsrp/8Qf3642rCvZwXcaWjnhoAQoYGYKz+6cOEHSRwQiVVHVjLrUwGT+If0DG8BjuBxi DmlyVLaHQYy2ZFgFl2VdzugFuTexsy6h0yOJqfw7bBYaaA90+Embn2i46Qn7XvcunN8V C1ASRudw8M03GTk/7vZDCQQyCv+LzBupQ5i89YOC+0160mk4557WW1vao6DG/r7p8xlN w2fA== X-Gm-Message-State: AOAM533LnokqPyRhWk0SKY7xE6Eee4h17xmLAvZZa/VIfVXj3wumaKDe mEKTLS0EAv7EtlVXJcdSJtcQeWJLtK0= X-Received: by 2002:a05:6512:20d:: with SMTP id a13mr7471798lfo.36.1590866472146; Sat, 30 May 2020 12:21:12 -0700 (PDT) Received: from mail-lf1-f49.google.com (mail-lf1-f49.google.com. [209.85.167.49]) by smtp.gmail.com with ESMTPSA id h2sm3194732ljb.45.2020.05.30.12.21.11 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 30 May 2020 12:21:11 -0700 (PDT) Received: by mail-lf1-f49.google.com with SMTP id u16so1641649lfl.8 for ; Sat, 30 May 2020 12:21:11 -0700 (PDT) X-Received: by 2002:a19:6a0e:: with SMTP id u14mr7258369lfu.192.1590866470633; Sat, 30 May 2020 12:21:10 -0700 (PDT) MIME-Version: 1.0 References: <20200528234025.GT23230@ZenIV.linux.org.uk> <20200529232723.44942-1-viro@ZenIV.linux.org.uk> <20200529232723.44942-8-viro@ZenIV.linux.org.uk> <20200530143147.GN23230@ZenIV.linux.org.uk> <81563af6-6ea2-3e21-fe53-9955910e303a@redhat.com> <20200530183853.GQ23230@ZenIV.linux.org.uk> <20200530191424.GR23230@ZenIV.linux.org.uk> In-Reply-To: <20200530191424.GR23230@ZenIV.linux.org.uk> From: Linus Torvalds Date: Sat, 30 May 2020 12:20:54 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 8/9] x86: kvm_hv_set_msr(): use __put_user() instead of 32bit __clear_user() To: Al Viro Cc: Paolo Bonzini , Linux Kernel Mailing List , linux-fsdevel , KVM list Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, May 30, 2020 at 12:14 PM Al Viro wrote: > > > And none of that code verifies that the end result is a user address. > > kvm_is_error_hva() is > return addr >= PAGE_OFFSET; Ahh, that's what I missed. It won't work on other architectures, but within x86 it's fine. Linus