Re: [PATCH 1/4] module: add syscall to load module from fd
From: Michael Kerrisk (man-pages)
Date: Thu Oct 18 2012 - 09:00:02 EST
On Thu, Oct 18, 2012 at 5:12 AM, Rusty Russell <rusty@xxxxxxxxxxxxxxx> wrote:
> "Michael Kerrisk (man-pages)" <mtk.manpages@xxxxxxxxx> writes:
>> Sure. But my point that started this subthread was: should we take the
>> opportunity now to add a 'flags' argument to the new finit_module()
>> system call, so as to allow flexibility in extending the behavior in
>> future? There have been so many cases of revised system calls in the
>> past few years that replaced calls without a 'flags' argument that it
>> seems worth at least some thought before the API is cast in stone.
> (CC's trimmed, Lucas & Jon added; please include them in module
> So I tried to think of why we'd want flags; if I could think of a
> plausible reason, obviously we should do it now.
> I think it would be neat for the force flags (eg. ignoring modversions
> or ignoring kernel version). These are the only cases where libkmod
> needs to mangle the module.
> So here's the patch which adds the flags field, but nothing in there
> yet. I'll add the remove flags soon, so libkmod can assume that if the
> syscall exists, those flags will work.
> FIX: add flags arg to sys_finit_module()
> Thanks to Michael Kerrisk for keeping us honest.
w00t! Thanks, Rusty ;-).
Acked-by: Michael Kerrisk <mtk.manpages@xxxxxxxxx>
> + if (flags)
> + return -EINVAL;
And thanks for that check. So easy, so obvious, and so often forgotten.
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Author of "The Linux Programming Interface"; http://man7.org/tlpi/
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/