[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHk-=wiaGVapioim31weBWs4bnzt7+wdyAx8GNFVgrFCLc-YXg@mail.gmail.com>
Date: Wed, 14 Jul 2021 13:16:19 -0700
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Christoph Hellwig <hch@...radead.org>,
Bart Van Assche <bvanassche@....org>
Cc: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
linux-fsdevel <linux-fsdevel@...r.kernel.org>
Subject: Re: [GIT PULL] configfs fix for Linux 5.14
On Wed, Jul 14, 2021 at 1:05 PM Linus Torvalds
<torvalds@...ux-foundation.org> wrote:
>
> I hope/think that we always end up checking 'pos' in the VFS layer so
> that this isn't a bug in practice
Yeah, we seem to make sure everything is fine in rw_verify_area().
We do allow negative 'pos' things, but only for files marked with
FMODE_UNSIGNED_OFFSET, which is basically just for variations of
/dev/mem and /proc/<pid>/mem that need the whole 64-bit range.
So it _shouldn't_ be an issue here, but the points about just doing
the legible and safe version stands.
Linus
Powered by blists - more mailing lists