Re: [PATCH -tip v2 3/9] ftrace/x86: Support SAVE_REGS feature oni386

From: Steven Rostedt
Date: Tue Jun 05 2012 - 19:37:49 EST


On Tue, 2012-06-05 at 17:24 -0400, Frank Ch. Eigler wrote:
> Hi -
>
> On Tue, Jun 05, 2012 at 04:37:46PM -0400, Steven Rostedt wrote:
> > [...]
> > I'm not sure we really need to restore all the regs. I'll keep this for
> > now, but for an optimization, we can just restore the ones that mcount
> > mcount needs to.
> >
> > Or do you expect kprobes to change any of theses?
>
> That would be the way for a kprobe to modify variables/values that
> happen to be in the registers. In systemtap, for example:
>
> # stap -g -e 'probe kernel.function("foo") { $bar = 1 }'
>

And why would we want to allow this?


Modifying variables with probes is another way to lead to disaster. If
the system did not intend for a variable to be a certain value, why let
someone change it?

What real world example leads to external sources modifying internal
core variables? With the obvious exception of rootkits.

-- Steve


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/