Re: [PATCH v2 4/4] x86/static_call: Add inline static call implementation for x86-64

From: Steven Rostedt
Date: Thu Nov 29 2018 - 13:47:32 EST


On Thu, 29 Nov 2018 10:23:44 -0800
Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:

> On Thu, Nov 29, 2018 at 9:59 AM Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:
> >
> > Do you realize that the cmpxchg used by the first attempts of the
> > dynamic modification of code by ftrace was the source of the e1000e
> > NVRAM corruption bug.
>
> If you have a static call in IO memory, you have bigger problems than that.
>
> What's your point?

Just that cmpxchg on dynamic modified code brings back bad memories ;-)

>
> Again - I will point out that the things you guys have tried to come
> up with have been *WORSE*. Much worse.

Note, we do have a bit of control at what is getting called. The patch
set requires that the callers are wrapped in macros. We should not
allow just any random callers (like from asm).

This isn't about modifying any function call. This is for a specific
subset, that we can impose rules on.

-- Steve