lkml.org 
[lkml]   [2008]   [Jul]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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


\
 
 \ /
  Last update: 2008-07-14 18:03    [W:0.061 / U:0.124 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site