bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: TSS switching


From: Roland McGrath
Subject: Re: TSS switching
Date: Sun, 7 Oct 2001 19:05:52 -0400 (EDT)

> I want to start a new thread for this.  Below is my current patch to fix the
> I/O permission code.  All of it works.  However, it is broken nevertheless:
> Although the user tss is correctly (AFAICS) setup, it doesn't come
> effective:  The program is killed with Illegal Instruction.  I am at my wits
> end, as the code seems to be correct and I don't know how to debug it
> further.

I could speculate about it or suggesting methods of debugging.
But you know, why don't we just punt this whole implementation?

>From looking at what Linux does, it appears to be sufficient just to diddle
the bitmap offset field or the bitmap itself in the in-memory tss, without
doing anything special to reload it into the CPU.  Doing a task switch is
probably at least as expensive as diddling the bitmap.  Linux doesn't use
task switch at all, it just diddles the bitmap in the single tss.

So let's do that.  It's easy and you probably don't have as much weirdo
Intel magic to debug than with tss switching.

When we make it task based, we just move the code into the existing
old-task!=new-task test used for switching the address space.

When switching to a task that has no bitmap, you can just change the
io_bit_map_offset to point past the end of the segment and not do any copying.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]