lkml.org 
[lkml]   [2022]   [Mar]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v1] fs: Fix inconsistent f_mode
From
On 2022/03/12 7:15, Paul Moore wrote:
> The silence on this has been deafening :/ No thoughts on fixing, or
> not fixing OPEN_FMODE(), Al?

On 2022/03/01 19:15, Mickaël Salaün wrote:
>
> On 01/03/2022 10:22, Christian Brauner wrote:
>> That specific part seems a bit risky at first glance. Given that the
>> patch referenced is from 2009 this means we've been allowing O_WRONLY |
>> O_RDWR to succeed for almost 13 years now.
>
> Yeah, it's an old bug, but we should keep in mind that a file descriptor
> created with such flags cannot be used to read nor write. However,
> unfortunately, it can be used for things like ioctl, fstat, chdir… I
> don't know if there is any user of this trick.

I got a reply from Al at https://lkml.kernel.org/r/20090212032821.GD28946@ZenIV.linux.org.uk
that sys_open(path, 3) is for ioctls only. And I'm using this trick when opening something
for ioctls only.

\
 
 \ /
  Last update: 2022-03-12 02:37    [W:0.058 / U:0.136 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site