linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andi Kleen <ak@muc.de>
To: Trond Myklebust <trond.myklebust@fys.uio.no>
Cc: viro@www.linux.org.uk, linux-fsdevel@vger.kernel.org
Subject: Re: negative seek offsets in VFS
Date: 25 May 2005 20:48:48 +0200
Date: Wed, 25 May 2005 20:48:48 +0200	[thread overview]
Message-ID: <20050525184848.GS86087@muc.de> (raw)
In-Reply-To: <1117040204.12336.32.camel@lade.trondhjem.org>

On Wed, May 25, 2005 at 12:56:44PM -0400, Trond Myklebust wrote:
> on den 25.05.2005 Klokka 18:39 (+0200) skreiv Andi Kleen:
> > My x86-64 users are complaining again that they cannot reach kernel
> > text addresses in /dev/kmem. The reason is that they are negative and
> > the the VFS read and seek code just EINVALs them. For seek I could
> > fix it in drivers/char/mem.c, but for read/pread/write etc.
> > it needs VFS changes.
> > 
> > I dont quite get why they are there anyways, the super block has 
> > max file size field and checking against that should be enough for
> > all the filesystems, no?
> 
> Isn't /dev/kmem overriding the default llseek()?
> 
> AFAICS, drivers/char/mem.c defines "memory_lseek()" for precisely the
> above reason.

Yes, but that is not enough. read/write have these checks too,
even pread/pwrite.

-Andi

  reply	other threads:[~2005-05-25 18:48 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-25 16:39 negative seek offsets in VFS Andi Kleen
2005-05-25 16:56 ` Trond Myklebust
2005-05-25 18:48   ` Andi Kleen [this message]
2005-05-26  0:56 ` Bryan Henderson
2005-05-26 19:20   ` Andi Kleen
2005-05-26 15:15 ` Al Viro
2005-05-26 15:29   ` Linus Torvalds
2005-05-26 19:25     ` Andi Kleen
2005-05-26 19:39       ` Linus Torvalds
  -- strict thread matches above, loose matches on Subject: below --
2005-05-26 14:29 Paul Taysom
     [not found] <s29588e0.089@sinclair.provo.novell.com>
2005-05-26 17:49 ` Bryan Henderson
2005-05-26 19:23   ` Andi Kleen
2005-05-26 21:17     ` Bryan Henderson
2005-05-27 10:43       ` Andi Kleen
2005-05-27 18:39         ` Bryan Henderson
2005-05-28 12:41           ` Jamie Lokier
2005-05-31 18:08             ` Bryan Henderson
2005-05-30  9:36           ` Andi Kleen
2005-05-31 18:33             ` Bryan Henderson
2005-05-28 12:37         ` Jamie Lokier
2005-05-30  9:32           ` Andi Kleen

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=20050525184848.GS86087@muc.de \
    --to=ak@muc.de \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=trond.myklebust@fys.uio.no \
    --cc=viro@www.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).