Re: Hammer thread fixes

Ulrich Drepper (drepper@redhat.com)
Sat, 15 Mar 2003 14:25:00 -0800


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Andi Kleen wrote:

> It's incorrect like I told you last time. arg 4 is in r10. Linus please don't
> apply.

Of course is arg 4 in r10.

> The clone prototype is
>
> int clone(int flags, unsigned long newsp, void *parent_tid, void *child_tid) ;

That's the prototype in process.c. From the user level it is

int clone(int flags, unsigned long newsp, void *parent_tid, void
*child_tid, void *tlsaddr)

>
> rax: __NR_clone
> rdi: flags
> rsi: newsp
> rdx: parent_tid
> r10: child_tid

You don't get it. The parameter which is passed on is the TLS address
which does not appear in the parameter list but is passed in the *fifth*
parameter. TLS address != child_tid! The patch is correct and
regardless of what ak said, please apply it. Unlike ak's claims it is
actually tested. I'm running such a kernel and threads actually work
(unlike with the original kernel).

- --
- --------------. ,-. 444 Castro Street
Ulrich Drepper \ ,-----------------' \ Mountain View, CA 94041 USA
Red Hat `--' drepper at redhat.com `---------------------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE+c6g82ijCOnn/RHQRApE+AJ9Aus8jJBg81L2A12ghG89HmfPz1wCgyldz
NUazXDCnqkvJ3qWAGkNbY9U=
=u/Oe
-----END PGP SIGNATURE-----

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/