Re: [GIT PULL] configfs fix for Linux 5.14

From: Linus Torvalds
Date: Wed Jul 14 2021 - 16:18:02 EST


On Wed, Jul 14, 2021 at 1:05 PM Linus Torvalds
<torvalds@xxxxxxxxxxxxxxxxxxxx> 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