Re: [PATCH] Boottime allocated GDTs and doublefault handler

From: Linus Torvalds
Date: Sun Dec 19 2004 - 21:30:45 EST

On Sun, 19 Dec 2004, Zwane Mwaikambo wrote:
> GDTs on SMP tend to be above the current ptr_ok limits since they are
> boottime allocated. How does the following new arbitrary limit look?

Ugh. That "ptr_ok()" macro was a total hack to get it working in the first
place, we really shouldn't do that.

How about just making it a small function that actually walks the page
tables (looking at %cr3 to find the base - at doublefault time it's not
sane to try to depend on much anything else than raw register/memory

It's not much of an issue for the gdt/tss checks, since those are very
unlikely to be wrong anyway, but if we want to make the code print out any
other information (like the old stack contents, and process info), then a
"ptr_ok()" thing that actually is dependable would be a lot more useful..

Hint hint..

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at