Re: [patch] tls-2.5.31-C3

Alan Cox (alan@lxorguk.ukuu.org.uk)
12 Aug 2002 11:08:16 +0100


On Mon, 2002-08-12 at 09:23, Stephen Rothwell wrote:
> > you can save/restore 0x40 in kernel-space if you need to no problem.
> I guess I could around every BIOS call ...
>
> Also, Alan (Cox) will say that's OK until he does APM on SMP on broken
> BIOS's :-)

SMP actually makes no difference. I have full SMP APM working on my test
boxes now. However pre-empt and SMP are the same problem space

> We could also just say that we no longer support those broken BIOS's ...
>
> > so you are using the kernel's GDT in real mode as well?

Yes. APM calls are made by all sorts of processes.

> No. The problem is that there are some BIOS's that contain code that (even
> though they are called in protected mode) load 0x40 into ds and expect to
> be able to reference stuff ... Causes really interesting OOPSs :-(

Which does mean you can steal the old TLS value and put it back across
the calls just by changing the TLS data for that process. For that
matter on Windows emulation I thought Windows also needed 0x40 to be the
same offset as the BIOS does so can't we leave it hardwired ?

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