[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALCETrUM0cko=5ki-Dd402DNFU2TmgnJTz_vfrsaofkGD-1kmA@mail.gmail.com>
Date: Wed, 15 Sep 2021 09:47:25 -0700
From: Andy Lutomirski <luto@...nel.org>
To: Thomas Weißschuh <thomas@...ch.de>
Cc: Linux API <linux-api@...r.kernel.org>,
LKML <linux-kernel@...r.kernel.org>,
Luis Chamberlain <mcgrof@...nel.org>,
Jessica Yu <jeyu@...nel.org>
Subject: Re: [RFC] Expose request_module via syscall
On Wed, Sep 15, 2021 at 8:50 AM Thomas Weißschuh <thomas@...ch.de> wrote:
>
> Hi,
>
> I would like to propose a new syscall that exposes the functionality of
> request_module() to userspace.
>
> Propsed signature: request_module(char *module_name, char **args, int flags);
> Where args and flags have to be NULL and 0 for the time being.
>
> Rationale:
>
> We are using nested, privileged containers which are loading kernel modules.
> Currently we have to always pass around the contents of /lib/modules from the
> root namespace which contains the modules.
> (Also the containers need to have userspace components for moduleloading
> installed)
>
> The syscall would remove the need for this bookkeeping work.
I feel like I'm missing something, and I don't understand the purpose
of this syscall. Wouldn't the right solution be for the container to
have a stub module loader (maybe doable with a special /sbin/modprobe
or maybe a kernel patch would be needed, depending on the exact use
case) and have the stub call out to the container manager to request
the module? The container manager would check its security policy and
load the module or not load it as appropriate.
--Andy
Powered by blists - more mailing lists