Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp3171134pxu; Sat, 10 Oct 2020 23:25:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyiT9Vhw+5+DCxUuzytsMoph6n1uGGtNpoR48WlYz68gMdMdomV0HPAGN1fPHyfCZ0qBdhX X-Received: by 2002:a17:906:c0d8:: with SMTP id bn24mr22044546ejb.480.1602397501623; Sat, 10 Oct 2020 23:25:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602397501; cv=none; d=google.com; s=arc-20160816; b=XQeHbwcdbJEEXZbyLersKilzCoOyjfrQKFas636A/UlEMVoSLGJIwME6ixoszFeP79 GSIraSTeSKuJ03zNCBeYEX/KBbFNrlTeJssogd2Wo0piWn408wagHwiaXK2Xsc4k3nXc ff2Z1C0u7E0Q9AzP+v2tuwVw9+PGw7mWxzQjFjP4UCjEU9Q6WV6isKixW7B1ryLCi+ib 00fJzmSJiTchNExcvy73nRTbPUk15H8/TZog1rFXu7oaX4j+IhHyotkLp0J4eA3Cvde9 k6bziSjuJSTOZrYZkEIWzwQZ5YFulruNvnCp9WYZzBlK35gStWWRnjFpckw4pqP7JvHR k0NA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=TX//N8UHRF+Kxr9aBh5j5RlCKkOuxsMr0TTUhTDAYwI=; b=Y5BrgN4mLmMujqS3lLRLsA5NLt1EzudSbGVONQVrOAV3Jr9cNHbhIOm9Xyl34lNeI2 YQpiV9mKvv1/yubhxzAcm5Qaw/OayIjEh26JIZkBjAvK931d07QYtWO8W0/Y0u27CN/v AKwvFpXOd5/6JlN5X5d7e+6QUvvYjijfJEWn94A2o6QNonZXmiELN14pp4D7G85gh6KK wYg4F46/rpUEqQhrXHHEL/scDUd2k/iyRZdkmT18xgLIrsNmkuyT35vVluChLPxQ8UhM ZXicmv7bbYKQ4BnxfyDDj6JsRgb8BDbsPAMVI/+sBqXCrDMzRv6zADEzR3nLZb5cMsiW 90vg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=fnNqw0Px; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cd8si11397137ejb.627.2020.10.10.23.24.38; Sat, 10 Oct 2020 23:25:01 -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=@kernel.org header.s=default header.b=fnNqw0Px; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729862AbgJJBr3 (ORCPT + 99 others); Fri, 9 Oct 2020 21:47:29 -0400 Received: from mail.kernel.org ([198.145.29.99]:54446 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729627AbgJJBT1 (ORCPT ); Fri, 9 Oct 2020 21:19:27 -0400 Received: from sol.localdomain (172-10-235-113.lightspeed.sntcca.sbcglobal.net [172.10.235.113]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E21C92222E; Sat, 10 Oct 2020 01:19:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1602292761; bh=/LYWflPFUQmr4zRX/3aYO5X4zGhKa6rc4/cUxk3xBL0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=fnNqw0PxV6IX/oLMEyLtVNaBKSLmW486bhyKJLb6xU/3aVPdJKhHCe2HS/jCJdP0f h0sh+gunMLdhhfPbzEwE/adD6a+CcuxJBLWFF4wZ5mMEi09wQZiAX4gGdyI1D/7+Em Ko/SaQsKuwBj912JA0Lt3zk0AWrOM2p3zFXWLH54= Date: Fri, 9 Oct 2020 18:19:19 -0700 From: Eric Biggers To: Linus Torvalds Cc: Al Viro , Christoph Hellwig , Michael Ellerman , the arch/x86 maintainers , Alexey Dobriyan , Luis Chamberlain , Kees Cook , Linux Kernel Mailing List , linux-fsdevel , linux-arch , linuxppc-dev Subject: Re: [PATCH 05/14] fs: don't allow kernel reads and writes without iter ops Message-ID: <20201010011919.GC1122@sol.localdomain> References: <20200903142242.925828-1-hch@lst.de> <20200903142242.925828-6-hch@lst.de> <20201001223852.GA855@sol.localdomain> <20201001224051.GI3421308@ZenIV.linux.org.uk> <20201009220633.GA1122@sol.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 09, 2020 at 06:03:31PM -0700, Linus Torvalds wrote: > On Fri, Oct 9, 2020 at 3:06 PM Eric Biggers wrote: > > > > It's a bit unintuitive that ppos=NULL means "use pos 0", not "use file->f_pos". > > That's not at all what it means. > > A NULL ppos means "this has no position at all", and is what we use > for FMODE_STREAM file descriptors (ie sockets, pipes, etc). > > It also means that we don't do the locking for position updates. > > The fact that "ki_pos" gets set to zero is just because it needs to be > _something_. It shouldn't actually ever be used for stream devices. > Okay, that makes more sense. So the patchset from Matthew https://lkml.kernel.org/linux-fsdevel/20201003025534.21045-1-willy@infradead.org/T/#u isn't what you had in mind. - Eric