Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Carsten Langgaard <carstenl@mips.com>
To: "H. J. Lu" <hjl@lucon.org>
Cc: Ralf Baechle <ralf@oss.sgi.com>, linux-mips@oss.sgi.com
Subject: Re: pread and pwrite
Date: Wed, 17 Jul 2002 22:14:46 +0200	[thread overview]
Message-ID: <3D35D036.1EE50ADA@mips.com> (raw)
In-Reply-To: 20020717120108.A14143@lucon.org

"H. J. Lu" wrote:

> On Wed, Jul 17, 2002 at 04:18:17PM +0200, Carsten Langgaard wrote:
> > Ralf Baechle wrote:
> >
> > > On Wed, Jul 17, 2002 at 11:03:55AM +0200, Carsten Langgaard wrote:
> > >
> > > >
> > > > Here there is some checking for sane values and a proper error value is
> > > > return.
> > > > I guess this routine is replaced, if we have the syscall implemented
> > > > with the sysdeps/unix/sysv/linux/mips/pread.c file.
> > > > Here there is no check for sane values, is there any reason why ?
> > > > The same thing goes for pwrite.
> > >
> > > The kernel does it's own error checking.  No need to duplicate that in
> > > userspace.
> >
> > The kernel doesn't do this a proper check then.
> > The pread/pwrite parameters is also convert in glibc, the 'offset' is
> > convert from a 'long' to a 'long long', but it isn't sign extended.
> > So when pread is call with offset -1, then kernel won't see it as -1.
> >
>
> Please check it out:
>
> http://sources.redhat.com/ml/libc-alpha/2002-07/msg00188.html
>
> H.J.

So the same issue has been raised today on the glibc list, amazing. I guess the
problem has existed quite some time.
But it look like the patch will fix the problem. Do you know if the patch has
been committed and which version of glibc will it then be fixed in ?

Thanks,
/Carsten

      reply	other threads:[~2002-07-17 20:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-17  9:03 pread and pwrite Carsten Langgaard
2002-07-17 13:59 ` Ralf Baechle
2002-07-17 14:18   ` Carsten Langgaard
2002-07-17 19:01     ` H. J. Lu
2002-07-17 20:14       ` Carsten Langgaard [this message]

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=3D35D036.1EE50ADA@mips.com \
    --to=carstenl@mips.com \
    --cc=hjl@lucon.org \
    --cc=linux-mips@oss.sgi.com \
    --cc=ralf@oss.sgi.com \
    /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