It would only be used if we ever performed a hardware task switch
back to the kernel's default TSS. However, it's clearly wrong.
>
> bits and should be 0088 <GDT entry #17, RPL 0>
>
> And shouldn't CR3 be intitialized in case anyone actually wants to
> switch back to the kernel TSS?
For now no, since the only task gate ever taken (double fault), never
returns (you don't want to update the TSS's CR3 field on every
switch_to() so you would have to do it in the task gate return
path, as well as having a correct LDT field).
However, returning from a task gate is so much fraught with races wrt
segment registers that the best thing to do is to avoid it. Read out
the details on how segment registers are reloaded on a hardware task
switch to convince yourself.
Gabriel
>
>
> ------
> Chuck
> -
> 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/
-
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/