Re: [patch 3/5] vfs: introduce FMODE_NEG_OFFSET for allowing negative f_pos

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 21 Jul 2010 11:53:59 +0900 KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx> wrote:

> On Wed, 21 Jul 2010 12:54:37 +1000
> Nick Piggin <npiggin@xxxxxxx> wrote:
> 
> > On Tue, Jul 20, 2010 at 03:29:48PM -0700, Andrew Morton wrote:
> > > From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx>
> > > 
> > > Now, rw_verify_area() checsk f_pos is negative or not.  And if negative,
> > > returns -EINVAL.
> > > 
> > > But, some special files as /dev/(k)mem and /proc/<pid>/mem etc..  has
> > > negative offsets.  And we can't do any access via read/write to the
> > > file(device).
> > > 
> > > So introduce FMODE_NEG_OFFSET to allow negative file offsets.
> > 
> > Minor nitpick but I don't understand why this is called NEG_OFFSET. It's
> > a large positive offset into the file so FMODE_UNSIGNED_OFFSET seems
> > like it would be better.
> > 
> Ah, agreed.
> 
> I'll prepare a macro-renaming patch later (if this patch goes now.)

It won't.  I hand-edited the diff...
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux