[klibc] [PATCH] Add syscall wrappers required by libkeyutils

Christian Eggers ceggers at arri.de
Tue Jul 28 02:19:58 PDT 2020

On Tuesday, 28 July 2020, 05:11:03 CEST, H. Peter Anvin wrote:
> On 2020-07-27 19:20, hpa at zytor.com wrote:
> > ...
> > Now, thinking about it, it *might* be possible to implement some of this
> > using varadic macros. Let me play around with it a little bit.
> This might actually work:
> /*
>  * Not prototyped on purpose, as (...) isn't a valid prototype.
>  * __extension__ prevents erroring out due to lack of prototype.
>  */
> __extension__ extern long long ___syscall();
> extern long ___syscall_num;
> #define syscall(n, ...)                                       \
>   (___syscall_num = (n), ___syscall(__VA_ARGS__))
> ... then have ___syscall() get the system call number from the memory
> variable ___syscall_num (If klibc were multithreaded it would have to be a
> thread-local variable, of course) and call the common syscall handler code.

If you could provide a patch for ARM, I would test it with libkeyutils. I have
no special knowledge about the various calling conventions, but in case of
problems I have access to a JTAG debugger...


 [http://assets.arri.com/media/sign/2020-04-03-E-mail-signature-Stellar2_V1.jpg] <https://microsites.arri.com/stellar/>

Get all the latest information from www.arri.com<https://www.arri.com/>, Facebook<https://www.facebook.com/TeamARRI>, Twitter<https://twitter.com/ARRIChannel>, Instagram<https://instagram.com/arri> and YouTube<https://www.youtube.com/user/ARRIChannel>.

Arnold & Richter Cine Technik GmbH & Co. Betriebs KG
Sitz: München - Registergericht: Amtsgericht München - Handelsregisternummer: HRA 57918
Persönlich haftender Gesellschafter: Arnold & Richter Cine Technik GmbH
Sitz: München - Registergericht: Amtsgericht München - Handelsregisternummer: HRB 54477
Geschäftsführer: Dr. Michael Neuhäuser; Stephan Schenk; Walter Trauninger; Markus Zeiler

More information about the klibc mailing list