Thread (68 messages) flat view 68 messages, 14 authors, 2018-05-02

Re: [PATCH net-next] modules: allow modprobe load regular elf binaries

From: Alexei Starovoitov <hidden>
Date: 2018-03-09 01:20:53
Also in: linux-api, lkml

On Fri, Mar 09, 2018 at 12:59:36AM +0000, Andy Lutomirski wrote:
Alexei, can you give an example use case?  I'm sure it's upthread
somewhere, but I'm having trouble finding it.
at the time of iptable's setsockopt() the kernel will do
err = request_module("bpfilter");
once.
The rough POC code:
https://git.kernel.org/pub/scm/linux/kernel/git/ast/bpf.git/tree/net/ipv4/bpfilter/sockopt.c?h=ipt_bpf#n25
Also, I just tested this concept a bit.  Depmod invoked explicitly on
an ET_EXEC with a.ko extension gets mad, but depmod -a on a kernel
that has a "module" like that seems to work fine.  Go figure.
right. that's with the current patch.
In v2 I require .modinfo section to make sure license is specified,
but depmod still not very happy:
$ depmod /lib/modules/`uname -r`/kernel/net/bpfilter/bpfilter.ko
depmod: ERROR: Bad version passed /lib/modules/4.16.0-rc4-00799-g1716f0aa3039-dirty/kernel/net/bpfilter/bpfilter.ko
I'm not sure it's worth to silence it, since
as you noticed 'depmod -a' works.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help