Messages in this thread | | | Date | Thu, 19 Nov 2020 09:21:57 +0100 | From | Peter Zijlstra <> | Subject | Re: violating function pointer signature |
| |
On Wed, Nov 18, 2020 at 01:48:37PM -0600, Segher Boessenkool wrote:
> If you have at most four or so args, what you wnat to do will work on > all systems the kernel currently supports, as far as I can tell. It > is not valid C, and none of the compilers have an extension for this > either. But it will likely work.
So this is where we rely on the calling convention being caller-cleanup (cdecl has that).
I looked at the GCC preprocessor symbols but couldn't find anything that seems relevant to the calling convention in use, so barring that, the best option might to be have a boot-time self-test that triggers this. Then we'll quickly know if all architectures handle this correctly.
| |