[PATCH v2] arm64: implement support for static call trampolines

Quentin Perret qperret at google.com
Thu Oct 29 07:54:42 EDT 2020


On Thursday 29 Oct 2020 at 12:32:50 (+0100), Ard Biesheuvel wrote:
> We'll need tooling along the lines of the GCC plugin I wrote [0] to
> implement inline static calls - doing function calls from inline
> assembly is too messy, too fragile and too error prone to rely on.

Right, and that is the gut feeling I had too, but I can't quite put my
finger on what exactly can go wrong. Any pointers?

> However, as I discussed with Will offline yesterday as well, the
> question that got snowed under is whether we need any of this on arm64
> in the first place. It seems highly unlikely that inline static calls
> are worth it, and even out-of-line static calls are probably not worth
> the hassle as we don't have the retpoline problem.
> 
> So this code should be considered an invitation for discussion, and
> perhaps someone can invent a use case where benchmarks can show a
> worthwhile improvement. But let's not get ahead of ourselves.

The reason I'm interested in this is because Android makes heavy use of
trace points/hooks, so any potential improvement in this area would be
welcome. Now I agree we need numbers to show the benefit is real before
this can be considered for inclusion in the kernel. I'll try and see if
we can get something.

Thanks,
Quentin



More information about the linux-arm-kernel mailing list