All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Arnd Bergmann <arnd@arndb.de>
Cc: "Sadashiiv, Halesh" <halesh.sadashiv@ap.sony.com>,
	linuxppc-embedded@ozlabs.org
Subject: Re: Regarding select() on PPC
Date: Wed, 24 Sep 2008 17:08:50 +1000	[thread overview]
Message-ID: <1222240130.8277.67.camel@pasglop> (raw)
In-Reply-To: <200809240845.52262.arnd@arndb.de>

On Wed, 2008-09-24 at 08:45 +0200, Arnd Bergmann wrote:
> On Wednesday 24 September 2008, Benjamin Herrenschmidt wrote:
> > Why do we want it ?
> > 
> > It's an int, it's zero extended, but that should still be a valid signed
> > 32 bits int in compat_sys_select() or do I miss something ?
> 
> IIRC, the calling conventions on 64 bit ppc assume that a signed int
> argument is sign-extended into a 64 bit register. The compat syscall
> entry point does not know which registers are signed or unsigned, so
> it will always to zero-extend, making the register contain an undefined
> bit pattern (e.g. 0x00000000fffffffe), which may be interpreted as being
> a positive number. An explicit cast as it is done in ppc32_select turns
> this into a well-defined 32-bit number stored in a 64-bit register (e.g.
> 0xfffffffffffffffe).

If that is true, then _any_ syscall that takes an int value must have
a ppc specific sign-extending compat wrapper, are you sure that is
the case ?

Ben.

  reply	other threads:[~2008-09-24  7:09 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-23  7:16 Regarding select() on PPC Sadashiiv, Halesh
2008-09-23  9:07 ` Benjamin Herrenschmidt
2008-09-24  6:23   ` Arnd Bergmann
2008-09-24  6:28     ` Benjamin Herrenschmidt
2008-09-24  6:45       ` Arnd Bergmann
2008-09-24  7:08         ` Benjamin Herrenschmidt [this message]
2008-09-24 21:46           ` Benjamin Herrenschmidt
2008-09-24  6:39     ` [PATCH] remove bogus ppc_select syscall Arnd Bergmann
2008-09-24 16:29       ` Paul Mackerras
2008-09-24 17:03         ` Arnd Bergmann
2008-10-10  7:40           ` Paul Mackerras
2008-10-10  8:44             ` Arnd Bergmann
2008-10-10  4:29       ` Benjamin Herrenschmidt
2008-10-10  7:43         ` Paul Mackerras
2008-10-10  8:45           ` Arnd Bergmann
2008-10-10 23:17           ` Benjamin Herrenschmidt
2008-10-12  8:58             ` Arnd Bergmann
2008-10-13  2:42             ` i2o driver work with AMCC 460EX? Ayman El-Khashab
  -- strict thread matches above, loose matches on Subject: below --
2008-09-23  9:31 Regarding select() on PPC Sadashiiv, Halesh
2008-09-23  5:27 Sadashiiv, Halesh
2008-09-23  5:01 Sadashiiv, Halesh
2008-09-23  5:11 ` Benjamin Herrenschmidt
2008-09-23  5:46 ` Arnd Bergmann
2008-09-23  5:56   ` Benjamin Herrenschmidt
2008-09-23  6:01     ` Arnd Bergmann
2008-09-23  6:29       ` Benjamin Herrenschmidt
2008-09-23  4:50 Sadashiiv, Halesh
2008-09-23  4:55 ` Benjamin Herrenschmidt
2008-09-22 15:30 Sadashiiv, Halesh
2008-09-22 15:15 Sadashiiv, Halesh
2008-09-22 15:24 ` Josh Boyer
2008-09-23  4:42   ` Benjamin Herrenschmidt
2008-09-19 14:28 Sadashiiv, Halesh
2008-09-19 14:04 Halesh S
2008-09-22 14:47 ` Halesh S
2008-09-22 15:36   ` Andreas Schwab
2008-09-22 15:45     ` Halesh S
2008-09-23  4:25       ` Halesh S
2008-09-19 13:30 Sadashiiv, Halesh
2008-09-19 14:19 ` Josh Boyer
2008-09-19 11:50 Sadashiiv, Halesh
2008-09-19 14:53 ` Dale Farnsworth
2008-09-19 16:53   ` Dale Farnsworth

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=1222240130.8277.67.camel@pasglop \
    --to=benh@kernel.crashing.org \
    --cc=arnd@arndb.de \
    --cc=halesh.sadashiv@ap.sony.com \
    --cc=linuxppc-embedded@ozlabs.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.