public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* __NR_exit_group for 2.4-O(1)
@ 2003-01-03  0:15 J.A. Magallon
  2003-01-03  0:22 ` William Lee Irwin III
  2003-01-03  0:32 ` Christoph Hellwig
  0 siblings, 2 replies; 8+ messages in thread
From: J.A. Magallon @ 2003-01-03  0:15 UTC (permalink / raw)
  To: Lista Linux-Kernel

Hi all...

I am running glibc-2.3.1 on top of a hacked 2.4.21-pre2+aa, and all programs
show a curious message at exit when straced:

strace ls:
...
SYS_252(0, 0x1000, 0x156ad360, 0x156ae824, 0) = -1 ENOSYS (Function not implemented)
_exit(0)                                = ?

252 is __NR_exit_group. I can not recover anything about this on MARC, is there
any pointer to that for 2.4 ? Is it in -ac kernels ?

BTW: I remember to see some posts about this, but _how_ can I make the search
engine in MARC to do _not_ convert underscores to spaces ("exit_group" ->
"exit group", and results not be half the posts in LKML) ???

TIA

-- 
J.A. Magallon <jamagallon@able.es>      \                 Software is like sex:
werewolf.able.es                         \           It's better when it's free
Mandrake Linux release 9.1 (Cooker) for i586
Linux 2.4.21-pre2-jam2 (gcc 3.2.1 (Mandrake Linux 9.1 3.2.1-2mdk))

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: __NR_exit_group for 2.4-O(1)
  2003-01-03  0:15 __NR_exit_group for 2.4-O(1) J.A. Magallon
@ 2003-01-03  0:22 ` William Lee Irwin III
  2003-01-03  0:32 ` Christoph Hellwig
  1 sibling, 0 replies; 8+ messages in thread
From: William Lee Irwin III @ 2003-01-03  0:22 UTC (permalink / raw)
  To: J.A. Magallon; +Cc: Lista Linux-Kernel

On Fri, Jan 03, 2003 at 01:15:22AM +0100, J.A. Magallon wrote:
> Hi all...
> I am running glibc-2.3.1 on top of a hacked 2.4.21-pre2+aa, and all programs
> show a curious message at exit when straced:
> strace ls:
> ...
> SYS_252(0, 0x1000, 0x156ad360, 0x156ae824, 0) = -1 ENOSYS (Function not implemented)
> _exit(0)                                = ?
> 252 is __NR_exit_group. I can not recover anything about this on MARC, is there
> any pointer to that for 2.4 ? Is it in -ac kernels ?
> BTW: I remember to see some posts about this, but _how_ can I make the search
> engine in MARC to do _not_ convert underscores to spaces ("exit_group" ->
> "exit group", and results not be half the posts in LKML) ???

This is probably threading-related. They're trying to exit the program
as a whole so exit_group() (by divination) would appear to be something
that exits an entire thread group instead of that task alone.

It's probably somewhere in 2.5.x kernel source.

Bill

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: __NR_exit_group for 2.4-O(1)
  2003-01-03  0:15 __NR_exit_group for 2.4-O(1) J.A. Magallon
  2003-01-03  0:22 ` William Lee Irwin III
@ 2003-01-03  0:32 ` Christoph Hellwig
  2003-01-03  0:36   ` J.A. Magallon
  1 sibling, 1 reply; 8+ messages in thread
From: Christoph Hellwig @ 2003-01-03  0:32 UTC (permalink / raw)
  To: J.A. Magallon; +Cc: Lista Linux-Kernel

On Fri, Jan 03, 2003 at 01:15:22AM +0100, J.A. Magallon wrote:
> Hi all...
> 
> I am running glibc-2.3.1 on top of a hacked 2.4.21-pre2+aa, and all programs
> show a curious message at exit when straced:

Maybe it would be a better idea to complain to the glibc folks?

Your libc isn't the one from RH's new beta, is it? :)


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: __NR_exit_group for 2.4-O(1)
  2003-01-03  0:32 ` Christoph Hellwig
@ 2003-01-03  0:36   ` J.A. Magallon
  2003-01-03  0:45     ` Christoph Hellwig
  0 siblings, 1 reply; 8+ messages in thread
From: J.A. Magallon @ 2003-01-03  0:36 UTC (permalink / raw)
  To: Lista Linux-Kernel; +Cc: Christoph Hellwig


On 2003.01.03 Christoph Hellwig wrote:
> On Fri, Jan 03, 2003 at 01:15:22AM +0100, J.A. Magallon wrote:
> > Hi all...
> > 
> > I am running glibc-2.3.1 on top of a hacked 2.4.21-pre2+aa, and all programs
> > show a curious message at exit when straced:
> 
> Maybe it would be a better idea to complain to the glibc folks?
> 

Oh, no complain, just trying to add one more feature to 2.4 ;)

> Your libc isn't the one from RH's new beta, is it? :)
> 

Nope, Mandrake Cooker glibc-2.3.1-6.
I understand it is a glibc bug, it should detect at build time if the call
is available and omit it in 2.4...

-- 
J.A. Magallon <jamagallon@able.es>      \                 Software is like sex:
werewolf.able.es                         \           It's better when it's free
Mandrake Linux release 9.1 (Cooker) for i586
Linux 2.4.21-pre2-jam2 (gcc 3.2.1 (Mandrake Linux 9.1 3.2.1-2mdk))

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: __NR_exit_group for 2.4-O(1)
  2003-01-03  0:36   ` J.A. Magallon
@ 2003-01-03  0:45     ` Christoph Hellwig
  2003-01-03  0:50       ` J.A. Magallon
  0 siblings, 1 reply; 8+ messages in thread
From: Christoph Hellwig @ 2003-01-03  0:45 UTC (permalink / raw)
  To: J.A. Magallon; +Cc: Lista Linux-Kernel

On Fri, Jan 03, 2003 at 01:36:17AM +0100, J.A. Magallon wrote:
> > Your libc isn't the one from RH's new beta, is it? :)
> > 
> 
> Nope, Mandrake Cooker glibc-2.3.1-6.

glibc only tries to use sys_exit_group if the kernel headers it's compiled
against define __NR_exit_group.  AFAIK only the current RH beta ships
a kernel with a 2.4 backport of all the threading changes during 2.5, so
it might be worth asking the mdk glibc maintainer we he got his kernel
headers from.. (either redhat or 2.5 :))


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: __NR_exit_group for 2.4-O(1)
  2003-01-03  0:45     ` Christoph Hellwig
@ 2003-01-03  0:50       ` J.A. Magallon
  2003-01-03  0:56         ` Christoph Hellwig
  0 siblings, 1 reply; 8+ messages in thread
From: J.A. Magallon @ 2003-01-03  0:50 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: Lista Linux-Kernel


On 2003.01.03 Christoph Hellwig wrote:
> On Fri, Jan 03, 2003 at 01:36:17AM +0100, J.A. Magallon wrote:
> > > Your libc isn't the one from RH's new beta, is it? :)
> > > 
> > 
> > Nope, Mandrake Cooker glibc-2.3.1-6.
> 
> glibc only tries to use sys_exit_group if the kernel headers it's compiled
> against define __NR_exit_group.  AFAIK only the current RH beta ships
> a kernel with a 2.4 backport of all the threading changes during 2.5, so
> it might be worth asking the mdk glibc maintainer we he got his kernel
> headers from.. (either redhat or 2.5 :))
> 

It is defined in 2.4.20, undefined but reserved:

werewolf:/usr/src/linux-2.4.20> grep -r exit_group *
arch/x86_64/ia32/ia32entry.S:   .quad sys_ni_syscall    /* exit_group */
arch/i386/kernel/entry.S:       .long SYMBOL_NAME(sys_ni_syscall)       /* sys_exit_group */
include/asm-x86_64/ia32_unistd.h:#define __NR_ia32_exit_group           252
include/asm-i386/unistd.h:#define __NR_exit_group               252

???

-- 
J.A. Magallon <jamagallon@able.es>      \                 Software is like sex:
werewolf.able.es                         \           It's better when it's free
Mandrake Linux release 9.1 (Cooker) for i586
Linux 2.4.21-pre2-jam2 (gcc 3.2.1 (Mandrake Linux 9.1 3.2.1-2mdk))

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: __NR_exit_group for 2.4-O(1)
  2003-01-03  0:50       ` J.A. Magallon
@ 2003-01-03  0:56         ` Christoph Hellwig
  2003-01-03  3:23           ` Ulrich Drepper
  0 siblings, 1 reply; 8+ messages in thread
From: Christoph Hellwig @ 2003-01-03  0:56 UTC (permalink / raw)
  To: J.A. Magallon; +Cc: libc-alpha, Lista Linux-Kernel

Context for libc-alpha:  current glibc CVS gets tons of -ENOSYS when
running on 2.4.  That's because it tries to use sys_exit_group if
__NR_exit_group is defined.

On Fri, Jan 03, 2003 at 01:50:33AM +0100, J.A. Magallon wrote:
> werewolf:/usr/src/linux-2.4.20> grep -r exit_group *
> arch/x86_64/ia32/ia32entry.S:   .quad sys_ni_syscall    /* exit_group */
> arch/i386/kernel/entry.S:       .long SYMBOL_NAME(sys_ni_syscall)       /* sys_exit_group */
> include/asm-x86_64/ia32_unistd.h:#define __NR_ia32_exit_group           252
> include/asm-i386/unistd.h:#define __NR_exit_group               252

Hmm.  It looks like glibc should test for something else than :)


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: __NR_exit_group for 2.4-O(1)
  2003-01-03  0:56         ` Christoph Hellwig
@ 2003-01-03  3:23           ` Ulrich Drepper
  0 siblings, 0 replies; 8+ messages in thread
From: Ulrich Drepper @ 2003-01-03  3:23 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: J.A. Magallon, libc-alpha, Lista Linux-Kernel

Christoph Hellwig wrote:

> Hmm.  It looks like glibc should test for something else than :)

The code is correct as it is.  If the exit_group syscall does not exist
the normal exit is used.  There is by definition exactly one call to any
of these syscalls so who cares?

If there is any problem it is your strace which is far too old.

-- 
--------------.                        ,-.            444 Castro Street
Ulrich Drepper \    ,-----------------'   \ Mountain View, CA 94041 USA
Red Hat         `--' drepper at redhat.com `---------------------------


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2003-01-03  3:15 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-01-03  0:15 __NR_exit_group for 2.4-O(1) J.A. Magallon
2003-01-03  0:22 ` William Lee Irwin III
2003-01-03  0:32 ` Christoph Hellwig
2003-01-03  0:36   ` J.A. Magallon
2003-01-03  0:45     ` Christoph Hellwig
2003-01-03  0:50       ` J.A. Magallon
2003-01-03  0:56         ` Christoph Hellwig
2003-01-03  3:23           ` Ulrich Drepper

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox