Messages in this thread | | | Date | Mon, 14 Jul 2008 08:59:44 -0700 (PDT) | From | Linus Torvalds <> | Subject | Re: [git pull] core, x86: make LIST_POISON less deadly |
| |
On Mon, 14 Jul 2008, Ingo Molnar wrote: > > > > Why not use something sane like 0xdead000000000000, which has the high > > bit set but very fundamentally isn't a valid pointer, and never will > > be? And which is a *lot* more visually obvious too! > > initially i suggested that too - but such addresses raise a #GP instead > of a page fault so their decoding is a bit harder.
But raising a GP is exactly what you want: a PF is an indication that the address was actually half-way valid, and will not fault at all on some (possibly future) machine.
> We dont do any instruction decoding in #GP handlers to figure out what > happened, while in the pagefault case we know which address faulted, > etc.
Why would we care? It would be very obvious from the instruction disassembly plus the register contents. No need to decode instructions.
> Perhaps we could try to make #GP handlers a bit more informative - > although decoding instructions will make things a bit more fragile > inevitably. > > Perhaps make it 0xffffcdead0000000 ?
I'm really not seeing the reason for not just doing it right.
Linus
| |