[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 9 Oct 2020 18:03:31 -0700
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Eric Biggers <ebiggers@...nel.org>
Cc: Al Viro <viro@...iv.linux.org.uk>, Christoph Hellwig <hch@....de>,
Michael Ellerman <mpe@...erman.id.au>,
"the arch/x86 maintainers" <x86@...nel.org>,
Alexey Dobriyan <adobriyan@...il.com>,
Luis Chamberlain <mcgrof@...nel.org>,
Kees Cook <keescook@...omium.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
linux-fsdevel <linux-fsdevel@...r.kernel.org>,
linux-arch <linux-arch@...r.kernel.org>,
linuxppc-dev <linuxppc-dev@...ts.ozlabs.org>
Subject: Re: [PATCH 05/14] fs: don't allow kernel reads and writes without
iter ops
On Fri, Oct 9, 2020 at 3:06 PM Eric Biggers <ebiggers@...nel.org> 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.
Linus
Powered by blists - more mailing lists