Re: [git pull] core, x86: make LIST_POISON less deadly

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Linus Torvalds <torvalds@...>
Cc: Ingo Molnar <mingo@...>, Linux Kernel Mailing List <linux-kernel@...>, Andrew Morton <akpm@...>, Avi Kivity <avi@...>
Date: Monday, July 14, 2008 - 3:11 pm

Linus Torvalds wrote:

I've seen a lot of people who don't know too much assembler just work based
on the RIP. As in look it up in the source using addr2line or gdb and then try
to figure it out based on the source. Actually looking at the register contents
and how the instruction uses it is pretty arcane knowledge and usually
not even needed.  And with more and more kernel developers being
newbie friendly in this area is a good thing.



How about if the page fault handler checks for the value and prints
a obvious string? It could do this reliably, unlike the "grep
all registers for poison on #GP" method that was earlier proposed.


I discussed this with Avi earlier and we were careful to put it into
one of the guaranteed to be unmapped holes. This should actually not
change if the CPU changes because it's defined by the kernel mapping.

If these holes ever change the poison would need to change too, but
otherwise I don't really see how it should be particularly unreliable.

Ok it might break if someone messes up the direct mapping, but if that
happens you typically don't even go through the oops handler completely
and won't see the message.

-Andi


--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[git pull] core, x86: make LIST_POISON less deadly, Ingo Molnar, (Mon Jul 14, 10:48 am)
Re: [git pull] core, x86: make LIST_POISON less deadly, Linus Torvalds, (Mon Jul 14, 11:03 am)
Re: [git pull] core, x86: make LIST_POISON less deadly, Linus Torvalds, (Mon Jul 14, 2:42 pm)
Re: [git pull] core, x86: make LIST_POISON less deadly, Ingo Molnar, (Mon Jul 14, 11:12 am)
Re: [git pull] core, x86: make LIST_POISON less deadly, Linus Torvalds, (Mon Jul 14, 11:59 am)
Re: [git pull] core, x86: make LIST_POISON less deadly, Linus Torvalds, (Mon Jul 14, 2:42 pm)
Re: [git pull] core, x86: make LIST_POISON less deadly, Andi Kleen, (Mon Jul 14, 3:11 pm)
Re: [git pull] core, x86: make LIST_POISON less deadly, Linus Torvalds, (Mon Jul 14, 3:30 pm)
Re: [git pull] core, x86: make LIST_POISON less deadly, Avi Kivity, (Mon Jul 14, 12:08 pm)
Re: [git pull] core, x86: make LIST_POISON less deadly, Linus Torvalds, (Mon Jul 14, 12:26 pm)
Re: [git pull] core, x86: make LIST_POISON less deadly, Ingo Molnar, (Mon Jul 14, 12:34 pm)
Re: [git pull] core, x86: make LIST_POISON less deadly, Ingo Molnar, (Mon Jul 14, 12:07 pm)
Re: [git pull] core, x86: make LIST_POISON less deadly, Avi Kivity, (Mon Jul 14, 11:53 am)