Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp668066ybm; Thu, 28 May 2020 12:07:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJynxGZCN+LhXJXnm+lh3L61Y2R1Vaarr1qcxLgDvetPY6GF01UOXpxpIGmvm5RUJCMRz4DV X-Received: by 2002:a17:906:84f7:: with SMTP id zp23mr4507317ejb.437.1590692853625; Thu, 28 May 2020 12:07:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590692853; cv=none; d=google.com; s=arc-20160816; b=VLLr7J5tXWSZhFZ+Rsa8npWrhtM6uATSLFNUHRz12DF3kbi9ZoQ8O+SM96JkaFKcWd IjglrqpLpZTAa3HKJvLAT1HEqePNY8UCFNqJkUhs5rRGXpKYUOTN0ci6xy0a/kBT+LEY 12F3OirOSPFp7HtZ093IWlovE1CsGY2+e/SH/dxR0VOj1QHuPWa0pDaDnzd0g8tk7vdf XAke5nzqQGkNMyBCdRhHq1KJ7LcEff35FOYx2nyxBNJCZ9bl3030EvDdvkikBWieCCTK wU4lrOs1C2lLwfLMkJGKFBUyU/PPfaaNYA/a4gXwrBnJA8kJ9V5yq22rVWtDJqFBDwls y02Q== 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=MKoD1Xqwsr3hIVU78gW5C7wjGQrVgsSgH9y59H/mszU=; b=AhLVutlJiPxr8yJPqc6Bt3RsWfcWYhqyOqN56bfH1PhL9V6Bm7IHRpPCZW4JUeqW94 Iyjv6g/+ct3Kn8uowvepeH/hrb0aKXinltb4Be4WA5XGAV/I8f6lAofsf/Q7yhgo4yNk sLRyKaquNnUe93SkURO+SaVJ29AvQID5vmouT2yYgfrWb9uDZef+D6vNmlXAOTfX/5EJ U3XSMCHqZsYWQ13heHhe5B1F/hqGmp1MoeQ3ge3FrZzAfObU8/hPZ5ItZ1OqpkBjEYAK E7Vlj/BIBwE+i4LaxtFqJp07cVWKLMFlYTMU/yNLc7e+jeQhJOKCqkMn4R8HGxMDunCn iHvg== 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 qt3si3976960ejb.21.2020.05.28.12.07.10; Thu, 28 May 2020 12:07:33 -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 S2406109AbgE1TD1 (ORCPT + 99 others); Thu, 28 May 2020 15:03:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56546 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2405981AbgE1TD0 (ORCPT ); Thu, 28 May 2020 15:03: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 6A990C08C5C6; Thu, 28 May 2020 12:03:25 -0700 (PDT) Received: from viro by ZenIV.linux.org.uk with local (Exim 4.93 #3 (Red Hat Linux)) id 1jeNoD-00H4Wk-Ax; Thu, 28 May 2020 19:03:17 +0000 Date: Thu, 28 May 2020 20:03:17 +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 14/14] fs: don't change the address limit for ->read_iter in __kernel_read Message-ID: <20200528190317.GN23230@ZenIV.linux.org.uk> References: <20200528054043.621510-1-hch@lst.de> <20200528054043.621510-15-hch@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200528054043.621510-15-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:43AM +0200, Christoph Hellwig wrote: > If we read to a file that implements ->read_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 ->read with a changed address > limit if available. Ditto re never converting something that bails out on uaccess_kernel() in ->read() over to ->read_iter().