Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp1547117ybm; Sat, 30 May 2020 12:21:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJydLdjMyhAyqKk0bmPWMA2Az4IbTkvDQfApGlxZb+BNZbVDgWouJVreMX+xdD3qa+Mzjuuu X-Received: by 2002:a17:906:81ce:: with SMTP id e14mr12778676ejx.76.1590866507277; Sat, 30 May 2020 12:21:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590866507; cv=none; d=google.com; s=arc-20160816; b=lPNtGJJvzYQJzbCZVQXZsYfeyFMXDOtEoQSaPruB/uyywDUXY17pIKRk/oVhMigkuS 5xLR1A5U4nWv8H4xp+AE4TPvDczKwNnB/RjzZPVP+shEArQsAPwOCFXhzUiuNeS4zn1K 5SDk6V6MoBmsGYjrPVZUlx2DkIXZ4Drwbg0Xc+uwvIvp6AiWbc9OtL0ZzzAoUfmMRhuO dNRwIylzpUb+wJjU9WQ09E/2yPP2+2iwqrcBsba0dLgA7g9znsRh3o/tbDQNKW6m75bH NJIestd2hjbXDWG6j7nL3Bl8vcZR2w4qvVtv6FH6sEBF4zgjfGdblUbggvgnizhSRFpb iQqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=ON/8fLMnGL7puQq5FPgPDhrIa6eqbzaMCjVBi1hVd/s=; b=mzeaifCID3p61J3f51Jiy95irygciY7cAz5MM7uyr/CZ+y6ZZzLIc3wLxK1b533CDv xLkMFHQCght37y+iVprcohKb8Wq73DaGTqdl+uPYENGUli1613stAlZ0ikiM0EVbYSEa 4DnX2UAI4es0bz9g0f8tZJE40fyWL3SxMAjb0fSewIL4vaxCVjFEPMtawo7DobhaDL30 GxYJxwJvtiJzVPR0XC4+kLmm43naOSWJHGAwI7Pfq5qq2SvCIvv5QcqNRZnyjpJCXRJE 2OpFS/lEfh4u6QpcducPBN85p8fUv5bei6RLcr0kgBa3pWDzMpmEatSLYlSxw5BLVQx9 LaQg== 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 o10si8190227ejr.656.2020.05.30.12.21.23; Sat, 30 May 2020 12:21:47 -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 S1729268AbgE3TTo (ORCPT + 99 others); Sat, 30 May 2020 15:19:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55558 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728998AbgE3TTn (ORCPT ); Sat, 30 May 2020 15:19:43 -0400 Received: from ZenIV.linux.org.uk (zeniv.linux.org.uk [IPv6:2002:c35c:fd02::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AC300C03E969; Sat, 30 May 2020 12:19:43 -0700 (PDT) Received: from viro by ZenIV.linux.org.uk with local (Exim 4.93 #3 (Red Hat Linux)) id 1jf71B-000Yhf-0T; Sat, 30 May 2020 19:19:41 +0000 Date: Sat, 30 May 2020 20:19:40 +0100 From: Al Viro To: Linus Torvalds Cc: Paolo Bonzini , Linux Kernel Mailing List , linux-fsdevel , KVM list Subject: Re: [PATCH 8/9] x86: kvm_hv_set_msr(): use __put_user() instead of 32bit __clear_user() Message-ID: <20200530191940.GS23230@ZenIV.linux.org.uk> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 11:52:44AM -0700, Linus Torvalds wrote: > And I don't understand why you mention set_fs() vs access_ok(). None > of this code has anything that messes with set_fs(). The access_ok() > is garbage and shouldn't exist, and those user accesses should all use > the checking versions and the double underscores are wrong. > > I have no idea why you think the double underscores could _possibly_ > be worth defending. I do not. What I'm saying is that this just might be a beast different from *both* __... and the normal ones. I'm not saying that this __put_user() (or __clear_user(), etc.) is the right primitive here. If anything, it's closer to the situation for (x86) copy_stack_trace().