Linux-Fsdevel Archive on lore.kernel.org
help / color / mirror / Atom feed
From: David Laight <David.Laight@ACULAB.COM>
To: 'Linus Torvalds' <torvalds@linux-foundation.org>,
Christoph Hellwig <hch@lst.de>
Cc: Al Viro <viro@zeniv.linux.org.uk>, Ian Kent <raven@themaw.net>,
"David Howells" <dhowells@redhat.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
linux-fsdevel <linux-fsdevel@vger.kernel.org>,
LSM List <linux-security-module@vger.kernel.org>,
NetFilter <netfilter-devel@vger.kernel.org>
Subject: RE: [PATCH 05/13] fs: check FMODE_WRITE in __kernel_write
Date: Wed, 17 Jun 2020 14:59:39 +0000 [thread overview]
Message-ID: <a1dcd0f17c9c468980c2f62e8d2a4529@AcuMS.aculab.com> (raw)
In-Reply-To: <CAHk-=whfMo7gvco8N5qEjh+jSqezv+bd+N-7txpNokD39t=dhQ@mail.gmail.com>
From: Linus Torvalds
> Sent: 15 June 2020 17:40
> On Mon, Jun 15, 2020 at 5:13 AM Christoph Hellwig <hch@lst.de> wrote:
> >
> > We still need to check if the fѕ is open write, even for the low-level
> > helper.
>
> Is there actually a way to trigger something like this? I'm wondering
> if it's worth a WARN_ON_ONCE()?
>
> It doesn't sound sensible to have some kernel functionality try to
> write to a file it didn't open for write, and sounds like a kernel bug
> if this case were to ever trigger..
It's a cheap test at the top of some fairly heavy code.
Failing the request will soon identify the bug.
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
next prev parent reply other threads:[~2020-06-17 14:59 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-15 12:12 clean up kernel_{read,write} & friends v4 Christoph Hellwig
2020-06-15 12:12 ` [PATCH 01/13] cachefiles: switch to kernel_write Christoph Hellwig
2020-06-15 12:12 ` [PATCH 02/13] autofs: " Christoph Hellwig
2020-06-15 12:12 ` [PATCH 03/13] bpfilter: " Christoph Hellwig
2020-06-15 12:12 ` [PATCH 04/13] fs: unexport __kernel_write Christoph Hellwig
2020-06-15 12:12 ` [PATCH 05/13] fs: check FMODE_WRITE in __kernel_write Christoph Hellwig
2020-06-15 12:34 ` Matthew Wilcox
2020-06-15 13:48 ` Christoph Hellwig
2020-06-15 16:39 ` Linus Torvalds
2020-06-15 16:42 ` Christoph Hellwig
2020-06-17 14:59 ` David Laight [this message]
2020-06-15 12:12 ` [PATCH 06/13] fs: implement kernel_write using __kernel_write Christoph Hellwig
2020-06-15 12:12 ` [PATCH 07/13] fs: remove __vfs_write Christoph Hellwig
2020-06-15 12:12 ` [PATCH 08/13] fs: don't change the address limit for ->write_iter in __kernel_write Christoph Hellwig
2020-06-15 12:12 ` [PATCH 09/13] fs: add a __kernel_read helper Christoph Hellwig
2020-06-15 12:12 ` [PATCH 10/13] integrity/ima: switch to using __kernel_read Christoph Hellwig
2020-06-15 16:46 ` Linus Torvalds
2020-06-15 16:56 ` Linus Torvalds
2020-06-15 12:12 ` [PATCH 11/13] fs: implement kernel_read " Christoph Hellwig
2020-06-15 12:12 ` [PATCH 12/13] fs: remove __vfs_read Christoph Hellwig
2020-06-15 12:12 ` [PATCH 13/13] fs: don't change the address limit for ->read_iter in __kernel_read Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a1dcd0f17c9c468980c2f62e8d2a4529@AcuMS.aculab.com \
--to=david.laight@aculab.com \
--cc=dhowells@redhat.com \
--cc=hch@lst.de \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=raven@themaw.net \
--cc=torvalds@linux-foundation.org \
--cc=viro@zeniv.linux.org.uk \
--subject='RE: [PATCH 05/13] fs: check FMODE_WRITE in __kernel_write' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).