Re: [PATCH 1/2] powerpc: ptrace CHECK_FULL_REGS

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Benjamin Herrenschmidt <benh@...>
Cc: Paul Mackerras <paulus@...>, <linuxppc-dev@...>, David Woodhouse <dwmw2@...>, Andrew Morton <akpm@...>, Linus Torvalds <torvalds@...>, <linux-kernel@...>
Date: Monday, September 24, 2007 - 8:59 pm

> Yup, I think I ditched most of them.. for some reason I decided it

Well, it's a BUG_ON.  It's supposed to be for something that "can't happen".
That's why it's a sanity check, not a wild assertion. ;-)

The 2/2 patch is an example of a bug that CHECK_FULL_REGS catches.
In the status quo, using PTRACE_PEEKUSR in a bug case crashes while using
PTRACE_GETREGS in the same place might get bogus data.  (In the actual bug
thus found, the data is not bogus and only the bit that FULL_REGS checks is.)


Thanks,
Roland
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 1/2] powerpc: ptrace CHECK_FULL_REGS, Roland McGrath, (Mon Sep 24, 7:50 pm)
Re: [PATCH 1/2] powerpc: ptrace CHECK_FULL_REGS, Benjamin Herrenschmidt, (Mon Sep 24, 8:33 pm)
Re: [PATCH 1/2] powerpc: ptrace CHECK_FULL_REGS, Roland McGrath, (Mon Sep 24, 8:59 pm)
Re: [PATCH 1/2] powerpc: ptrace CHECK_FULL_REGS, Benjamin Herrenschmidt, (Mon Sep 24, 11:58 pm)