[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHk-=wiBJjjV4NuKr_z2Q3vWEXSoGtAmkH=jZ0SkBJ=wZh4=hw@mail.gmail.com>
Date: Mon, 15 Jun 2020 09:46:12 -0700
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Christoph Hellwig <hch@....de>
Cc: Al Viro <viro@...iv.linux.org.uk>, Ian Kent <raven@...maw.net>,
David Howells <dhowells@...hat.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
linux-fsdevel <linux-fsdevel@...r.kernel.org>,
LSM List <linux-security-module@...r.kernel.org>,
NetFilter <netfilter-devel@...r.kernel.org>
Subject: Re: [PATCH 10/13] integrity/ima: switch to using __kernel_read
On Mon, Jun 15, 2020 at 5:13 AM Christoph Hellwig <hch@....de> wrote:
>
> __kernel_read has a bunch of additional sanity checks, and this moves
> the set_fs out of non-core code.
Wel, you also seem to be removing this part:
> - if (!(file->f_mode & FMODE_READ))
> - return -EBADF;
which you didn't add in the previous patch that implemented __kernel_read().
It worries me that you're making these kinds of transformations where
the comments imply it's a no-op, but the actual code doesn't agree.
Especially when it's part of one large patch series and each commit
looks trivial.
This kind of series needs more care. Maybe that test isn't necessary,
but it isn't obvious, and I really don't like how you completely
glossed over totally changing what the code did.
Linus
Powered by blists - more mailing lists