Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp665268ybm; Thu, 28 May 2020 12:03:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwbsSUK+QXdcFpzj2ktr3Wo4Akm2fq1RIUiIYj1ADIkqH7ordO0Pqg1fB3T7/IqnrBTqEoP X-Received: by 2002:a50:a981:: with SMTP id n1mr4421571edc.377.1590692608915; Thu, 28 May 2020 12:03:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590692608; cv=none; d=google.com; s=arc-20160816; b=FKyARwT7Mn33/DEY2qIVmIlZG806Tz5J8ceYpAS44sPUaqIYvHe5xmGjY63RJ2kGmc YAaJhx1PBykkfVR1XqGQ8sFC038J9CGOdNLu/lC68a/jjjYA7avc+Dy1csfy7fuqLzZ5 WnWP/DWEGoNeLQu+UJtDPo/SvcKjXnl4j/vPF8EAVWUYmP4N5QJBqpQgBmuLIltMOJl8 Fq7E893qihZDXdr9iJVv90FRckPFLP8azkhtNqj2R8jPEH9RXZw97m5WRf0opfsXtPxV SAAwhldgm6ls6nsOSQ58Znn8plyne24ybfzkN1ZODYiT4IyjpzOC3zIUWpdt4ZFjrKzc Aljw== 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=Rw8887PEX5KV6KFrOMP5UIHlzBv5eHFHDo/aT8xulK0=; b=H4AS+kGzCACSs/QBrQNQVEPeEYJXfeC1S8LbMMUDnRc5frvGicBECDH1fEjnwS6oci 14riSYSR3g8BYXVwb7x3rvi63k5Wu6xMmmpJFG4b9WvnP7sk0weeIUK5If/3APgvaf8E TPqFX2yEDQ10VlXdpwC8aYNX8LlESxEQSiHzCJw7qBQT2IOq+C9yI8bDmqTsnRrlJOlW IyeFBXwUBG9nFkEEvQkNBn0iK31sgP+YZyvXH+IBL5GReC+Tl6tJohDm0PLmP9wXwA1+ 0Fg+oZ6AffIb4bVC6RmVH67UNYAUtvB2guY2Be3Nrp/qsWeibemmK6N14sVc1BLbKo27 Xn1Q== 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 g3si3938437edt.591.2020.05.28.12.03.05; Thu, 28 May 2020 12:03:28 -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 S2406070AbgE1TBD (ORCPT + 99 others); Thu, 28 May 2020 15:01:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56168 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2406018AbgE1TA7 (ORCPT ); Thu, 28 May 2020 15:00:59 -0400 Received: from ZenIV.linux.org.uk (zeniv.linux.org.uk [IPv6:2002:c35c:fd02::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5CC5DC08C5C6; Thu, 28 May 2020 12:00:59 -0700 (PDT) Received: from viro by ZenIV.linux.org.uk with local (Exim 4.93 #3 (Red Hat Linux)) id 1jeNls-00H4Qd-Rj; Thu, 28 May 2020 19:00:53 +0000 Date: Thu, 28 May 2020 20:00:52 +0100 From: Al Viro To: Christoph Hellwig Cc: Linus Torvalds , Ian Kent , David Howells , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-security-module@vger.kernel.org, netfilter-devel@vger.kernel.org Subject: Re: [PATCH 09/14] fs: don't change the address limit for ->write_iter in __kernel_write Message-ID: <20200528190052.GM23230@ZenIV.linux.org.uk> References: <20200528054043.621510-1-hch@lst.de> <20200528054043.621510-10-hch@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200528054043.621510-10-hch@lst.de> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 28, 2020 at 07:40:38AM +0200, Christoph Hellwig wrote: > If we write to a file that implements ->write_iter there is no need > to change the address limit if we send a kvec down. Implement that > case, and prefer it over using plain ->write with a changed address > limit if available. Umm... It needs a comment along the lines of "weird shits like /dev/sg that currently check for uaccess_kernel() will just have to make sure they never switch to ->write_iter()"