linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nick Piggin <npiggin@suse.de>
To: akpm@linux-foundation.org
Cc: viro@zeniv.linux.org.uk, linux-fsdevel@vger.kernel.org,
	kamezawa.hiroyu@jp.fujitsu.com, fengguang.wu@intel.com,
	heiko.carstens@de.ibm.com
Subject: Re: [patch 3/5] vfs: introduce FMODE_NEG_OFFSET for allowing negative f_pos
Date: Wed, 21 Jul 2010 12:54:37 +1000	[thread overview]
Message-ID: <20100721025437.GC2963@amd> (raw)
In-Reply-To: <201007202229.o6KMTmMF021834@imap1.linux-foundation.org>

On Tue, Jul 20, 2010 at 03:29:48PM -0700, Andrew Morton wrote:
> From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
> 
> 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.


  reply	other threads:[~2010-07-21  2:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-20 22:29 [patch 3/5] vfs: introduce FMODE_NEG_OFFSET for allowing negative f_pos akpm
2010-07-21  2:54 ` Nick Piggin [this message]
2010-07-21  2:53   ` KAMEZAWA Hiroyuki
2010-07-21  3:10     ` Wu Fengguang
2010-07-21  4:03     ` Andrew Morton
  -- strict thread matches above, loose matches on Subject: below --
2010-05-24 19:24 akpm

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100721025437.GC2963@amd \
    --to=npiggin@suse.de \
    --cc=akpm@linux-foundation.org \
    --cc=fengguang.wu@intel.com \
    --cc=heiko.carstens@de.ibm.com \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).