[PATCH] Add finit_module syscall for Linux
Mike Frysinger
vapier@gentoo.org
Wed Jan 23 17:44:00 GMT 2013
On Wednesday 23 January 2013 00:26:02 Kees Cook wrote:
> On Tue, Jan 22, 2013 at 9:02 PM, Mike Frysinger <vapier@gentoo.org> wrote:
> > On Tuesday 22 January 2013 23:06:06 Kees Cook wrote:
> >> On Tue, Jan 22, 2013 at 7:34 PM, Mike Frysinger <vapier@gentoo.org>
wrote:
> >> > On Tuesday 22 January 2013 22:16:38 Joseph S. Myers wrote:
> >> >> On Tue, 22 Jan 2013, Kees Cook wrote:
> >> >> > This adds the new Linux finit_module() syscall.
> >> >>
> >> >> There's no point in adding syscalls to syscalls.list without at least
> >> >> adding a symbol version so the function is actually exported from
> >> >> libc.so. Note that in the kexec_load discussion last May / June,
> >> >> doubts were expressed about whether some existing module-related
> >> >> syscalls really should have had functions in glibc.
> >> >
> >> > the lack of a header file that exports prototypes for these functions
> >> > seems like bad form too (not a new issue to finit_module)
> >>
> >> I got the impression those were auto-generated from syscalls.list
> >> (which contains the prototype in an encoded for ("i:isi" in
> >> finit_module's case). And that this generation is what converts the
> >> syscall into return value and errno?
> >
> > syscalls.list auto generates the simple funcs in glibc that are glorified
> > syscall() calls, but they don't (afaik) generate headers. grepping
> > installed glibc headers doesn't show any match that i can see either.
>
> Yeah, seems true. Weird. The callers (e.g. kmod) use their own externs.
> Hmpf
libkmod/libkmod-module.c:extern long init_module(const void *mem, unsigned
long len, const char *args);
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20130123/f8fbd453/attachment.sig>
More information about the Libc-alpha
mailing list