Re: [PATCH x86/mm 6/6] x86-64 ia32 ptrace get/putreg32 currenttask

From: Linus Torvalds
Date: Thu Nov 29 2007 - 15:26:03 EST




On Thu, 29 Nov 2007, Andi Kleen wrote:
>
> How would you catch (common) the case of them having different bases in the
> GDT TLS entries? At some point the selector has to be reloaded, otherwise
> it won't be picked up by the CPU.

You're right. I somehow thought we were using the LDT for TLS entries,
which I guess we did back before kernel support, but yeah, we're using
per-CPU GDT entries, and would need to check that those match too.

So yeah, the only safe ones are the ones we don't ever change, and that is
basically just the kernel entries (that users cannot load anyway).

So scratch that. You're right - the NUL selector is the only special one
for the context switcher.

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