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

hpa at zytor.com hpa at zytor.com
Mon Jul 27 05:46:22 PDT 2020

On July 27, 2020 2:43:36 AM PDT, Christian Eggers <ceggers at arri.de> wrote:
>On Saturday, 25 July 2020, 23:36:33 CEST, Ben Hutchings wrote:
>> On Wed, 2020-07-08 at 08:37 +0200, Christian Eggers wrote:
>> > ...
>> > libkeyutils usually invokes syscall() directly. As syscall() is not
>> > provided by klibc, libkeyutils has to be slightly modified for
>using the
>> > klibc wrappers.
>> Wouldn't it be more useful for klibc to implement syscall() then?
>I hope that somebody else could respond to this question as I am likely
>skilled enough to answer this.
>For me it looks like there are currently two cases of using syscalls in
>1. Exporting stubs directly: For many syscalls, automatically generated
>are directly exported as symbols for use by the linker. Examples:
>2. Using stubs internally for implementing public function. The auto
>stub is used as base for implementing a C library function. Example:
>For both cases, the code for the individual stubs is auto generated
>using a
>perl script (with an arch specific "plugin"). All generated stubs call
>arch specific assembly code (__syscall_common).
>The lack of the syscall function itself lead me to the (probably wrong)
>conclusion that this is "by design". Should all syscalls use the
>There are some syscalls which are traditionally not implemented by C
>(like keyctl, add_key and request_key). These functions are required
>mounting encrypted / authenticated (root) file systems. Programs using
>functionality call syscall() directly. Providing a syscall function in
>would avoid klibc specific modifications of such software.
>Are there reasons for NOT providing the syscall() function in klibc?
>Who is
>able to implement syscall() for klibc?
>Get all the latest information from
>Instagram<https://instagram.com/arri> and
>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

syscall(3) is not implemented by design, because it is silently broken on many architectures (mainly 32-bit ones.)
Sent from my Android device with K-9 Mail. Please excuse my brevity.

More information about the klibc mailing list