[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231109024023.GZ1957730@ZenIV>
Date: Thu, 9 Nov 2023 02:40:23 +0000
From: Al Viro <viro@...iv.linux.org.uk>
To: WoZ1zh1 <wozizhi@...wei.com>
Cc: brauner@...nel.org, akpm@...ux-foundation.org, oleg@...hat.com,
jlayton@...nel.org, dchinner@...hat.com, cyphar@...har.com,
shr@...kernel.io, linux-kernel@...r.kernel.org,
linux-fsdevel@...r.kernel.org, yangerkun@...wei.com
Subject: Re: [PATCH -next V2] proc: support file->f_pos checking in mem_lseek
On Thu, Nov 09, 2023 at 06:26:58PM +0800, WoZ1zh1 wrote:
> In mem_lseek, file->f_pos may overflow. And it's not a problem that
> mem_open set file mode with FMODE_UNSIGNED_OFFSET(memory_lseek). However,
> another file use mem_lseek do lseek can have not FMODE_UNSIGNED_OFFSET
> (kpageflags_proc_ops/proc_pagemap_operations...), so in order to prevent
> file->f_pos updated to an abnormal number, fix it by checking overflow and
> FMODE_UNSIGNED_OFFSET.
Umm... Is there any reasons why all of those shouldn't get FMODE_UNSIGNED_OFFSET
as well?
Powered by blists - more mailing lists