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

Linus Torvalds
2018-11-29T17:54:48Z

On Thu, Nov 29, 2018 at 9:50 AM Linus Torvalds
<torvalds@linux-foundation.org> wrote:
>
> - corrupt random registers because we "know" they aren't in use

Just to clarify: I think that's a completely unacceptable model.

We already have lots of special calling conventions, including ones
that do not have any call-clobbered registers at all, because we have
special magic calls in inline asm.

Some of those might be prime material for doing static calls (ie PV-op
stuff, where the native model does *not* change any registers).

So no. Don't do ugly hacks like that.

Linus