Re: [RFC][PATCH 1/2] x86: Allow breakpoints to emulate call functions

From: Steven Rostedt
Date: Tue May 07 2019 - 17:25:20 EST


On Tue, 7 May 2019 12:21:59 -0500
Josh Poimboeuf <jpoimboe@xxxxxxxxxx> wrote:

> regs->sp is *undefined* on x86-32. We're damning our future selves to
> have to always remember to use that darn kernel_stack_pointer() helper
> for eternity just because of x86-32.

And there's been several times I forget that regs->sp can not be read
directly. Especially most of my bug reports are for x86_64 these days.
But when I had that seldom x86_32 one, and go debugging, I would print
out "regs->sp" and then the system would crash. And I spend some time
wondering why?

It's been a bane of mine for some time.


-- Steve