Re: [PATCH] Clear TLS on execve

From: Jamie Lokier (lk@tantalophile.demon.co.uk)
Date: Thu Oct 31 2002 - 20:23:24 EST


Luca Barbieri wrote:
> This trivial patch causes the TLS to be cleared on execve (code is
> in flush_thread). This is necessary to avoid ESRCH errors when
> set_thread_area is asked to choose a free TLS entry after several
> nested execve's.

Ouch!

> The LDT also has a similar problem, but it is less serious because the
> LDT code doesn't scan for free entries. I'll probably send a patch to
> fix this too, unless there is something important relying on this behavior.

Ouch again! Does the LDT really not get released on execve? I am
using threading code which _does_ scan for free entries in the LDT -
using the lar instruction. I'd never stumbled across this, though.
I'll be glad of your patch.

-- Jamie
-
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/



This archive was generated by hypermail 2b29 : Thu Oct 31 2002 - 22:00:58 EST