All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: linuxppc-embedded@ozlabs.org
Cc: "Sadashiiv, Halesh" <halesh.sadashiv@ap.sony.com>
Subject: Re: Regarding select() on PPC
Date: Tue, 23 Sep 2008 07:46:02 +0200	[thread overview]
Message-ID: <200809230746.03234.arnd@arndb.de> (raw)
In-Reply-To: <7B7EF7F090B9804A830ACC82F2CDE95D56E14C@insardxms01.ap.sony.com>

On Tuesday 23 September 2008, Sadashiiv, Halesh wrote:
> 
> >I'm trying to sort out how obsolete it actually is and see if we can
> >remove the whole thing.
> >
> 
> Ok...once you verified please let me know.
> 

I just did some more research. The bug was introduced with Linux-2.1.48,
the same version in which Pauls name first appeared as the PPC guy
in the MAINTAINERS file, over 11 years ago.

Before that, ppc used to have distinct implementations for oldselect
(__NR_select) and select (__NR__newselect), because initially it shared
the syscall numbers with i386 and that had replaced its oldselect
with newselect in 1.3.0.

In essence, oldselect was already obsolete before it was introduced
in the powerpc architecture, but for obscure reasons, some code
must have confused the two calling conventions, so Cort introduced
the wrapper that could handle either one, and used it for both
syscalls. This of course made it theoretically impossible to ever
fix the implementation without potentially breaking user space one
way or another.

The 32 bit emulation code never implemented a call behind __NR_select
or the oldselect calling conventions, so anything relying on
the legacy behaviour is broken there already.

I would definitely switch over the ppc32 __NR_newselect implementation
to sys_select. For __NR_select, there is no correct solution, the three
options are the current ppc_select, the real sys_select or sys_ni_syscall.
Each of these is broken in different ways, but in practice it will never
be called anyway.

I love archeology.

	Arnd <><

  parent reply	other threads:[~2008-09-23  5:46 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-23  5:01 Regarding select() on PPC Sadashiiv, Halesh
2008-09-23  5:11 ` Benjamin Herrenschmidt
2008-09-23  5:46 ` Arnd Bergmann [this message]
2008-09-23  5:56   ` Benjamin Herrenschmidt
2008-09-23  6:01     ` Arnd Bergmann
2008-09-23  6:29       ` Benjamin Herrenschmidt
  -- strict thread matches above, loose matches on Subject: below --
2008-09-23  9:31 Sadashiiv, Halesh
2008-09-23  7:16 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
2008-09-24 21:46           ` Benjamin Herrenschmidt
2008-09-23  5:27 Sadashiiv, Halesh
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=200809230746.03234.arnd@arndb.de \
    --to=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.