mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bjorn Helgaas <bjorn.helgaas@hp.com>
To: Marcelo Tosatti <marcelo.tosatti@cyclades.com.br>
Cc: Marcelo Tosatti <marcelo@conectiva.com.br>,
	<linux-ia64@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] 2.4 force_successful_syscall()
Date: Wed, 17 Sep 2003 15:41:16 -0600	[thread overview]
Message-ID: <200309171541.16313.bjorn.helgaas@hp.com> (raw)
In-Reply-To: <Pine.LNX.4.44.0309171659510.3994-100000@logos.cnet>

On Wednesday 17 September 2003 2:00 pm, Marcelo Tosatti wrote:
> 
> On Wed, 10 Sep 2003, Bjorn Helgaas wrote:
> 
> > Here's a 2.4 backport of this change to 2.5:
> > 
> >     http://linux.bkbits.net:8080/linux-2.5/cset@1.1046.238.7?nav=index.html
> > 
> > Alpha, ppc, and sparc64 define force_successful_syscall_return() in 2.5,
> > but since it's not obvious to me how to do it correctly in 2.4, I left
> > them unchanged.
> 
> Whats the reasoning behing this patch?

Basically we don't want a large unsigned return value to be
misinterpreted as a syscall failure because it looks like
a small negative number.

>From David's description of the 2.5 patch (the link above has
the explanation):

Many architectures (alpha, ia64, ppc, ppc64, sparc, and sparc64 at least)
use a syscall convention which provides for a return value and a separate
error flag.  On those architectures, it can be beneficial if the kernel
provides a mechanism to signal that a syscall call has completed
successfully, even when the returned value is potentially a (small)
negative number.  The patch below provides a hook for such a mechanism via
a macro called force_successful_syscall_return().  On x86, this would be
simply a no-op (because on x86, user-level has to be hacked to handle such
cases).


  reply	other threads:[~2003-09-17 21:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200309101626.48541.bjorn.helgaas@hp.com>
2003-09-17 20:00 ` Marcelo Tosatti
2003-09-17 21:41   ` Bjorn Helgaas [this message]
2003-09-18  5:42   ` Aneesh Kumar K.V
2003-09-18  6:01     ` Aneesh Kumar K.V

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=200309171541.16313.bjorn.helgaas@hp.com \
    --to=bjorn.helgaas@hp.com \
    --cc=linux-ia64@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcelo.tosatti@cyclades.com.br \
    --cc=marcelo@conectiva.com.br \
    /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

all inboxes | Powered by JetHome®