LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Gabriel Paubert <paubert@iram.es>
To: Paul Mackerras <paulus@samba.org>
Cc: linuxppc-dev Development <linuxppc-dev@ozlabs.org>
Subject: Re: times(2) sys call bug?
Date: Fri, 21 Nov 2008 10:50:59 +0100	[thread overview]
Message-ID: <20081121095059.GA29260@iram.es> (raw)
In-Reply-To: <18726.31050.149408.815256@cargo.ozlabs.ibm.com>

On Fri, Nov 21, 2008 at 08:03:06PM +1100, Paul Mackerras wrote:
> Gabriel Paubert writes:
> 
> > On Fri, Nov 21, 2008 at 10:52:14AM +1100, Paul Mackerras wrote:
> > > Joakim Tjernlund writes:
> > > 
> > > > This little hack changes the kernel sys call handling in an crude
> > > > way and then it works. Apperently the kernel thinks is an error if the
> > > > syscall returns a value between -_LAST_ERRNO and -1.
> > > 
> > > Try this patch and let me if it fixes it.  If it does I'll push it
> > > upstream.
> > 
> > With your patch, you won't get EFAULT if you pass a bad
> > address, but a constant, time independent value, unless
> > I miss something. 
> 
> I think you are missing something, namely that I put the call to
> force_successful_syscall_return() AFTER the return -EFAULT.
> 

Indeed, it may be time to update the syscall documentation, saying
that you need to clear errno before the syscall and check errno
and not the return value since -1 is valid. 

Who does this? I have spotted some errors in other places on 
my man pages too, especially in the networking area (they were
correct once upon a time, but have not been updated).

	Regards,
	Gabriel

  parent reply	other threads:[~2008-11-21  9:51 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-20 15:09 times(2) sys call bug? Joakim Tjernlund
2008-11-20 15:37 ` Josh Boyer
2008-11-20 16:49   ` Joakim Tjernlund
2008-11-20 23:52     ` Paul Mackerras
2008-11-21  8:31       ` Joakim Tjernlund
2008-11-21  8:41       ` Gabriel Paubert
2008-11-21  8:47         ` Joakim Tjernlund
2008-11-21  9:03         ` Paul Mackerras
2008-11-21  9:15           ` Joakim Tjernlund
2008-11-21  9:50           ` Gabriel Paubert [this message]
2008-11-21  9:55             ` Paul Mackerras
2008-11-21 10:13             ` Joakim Tjernlund
2008-11-21  9:31       ` Joakim Tjernlund
2008-11-21  9:51         ` Paul Mackerras
2008-11-21 10:07           ` Joakim Tjernlund
2008-11-21  9:53         ` Joakim Tjernlund

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=20081121095059.GA29260@iram.es \
    --to=paubert@iram.es \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=paulus@samba.org \
    /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