BINFMT_MISC内核模块未使用
我正在评估基于NXP IMX.8(即ARM64V8)板。评估套件带有5.10.72 Linux内核,但没有binfmt_misc
内核模块。与供应商联系后,他们提供了与内核版本相匹配的所需模块。我将其放入/LIB/模块/$(UNAME -R)/KERNEL/drivers/FS/BINFMT_MISC.KO
然后echo binfmt_misc>>> /etc/模块&& /sbin/depmod&& SystemCtl重新启动
。
重新启动后,lsmod | GREP BINFMT
显示该模块现在已加载,但“使用0”。此外,Journal ctl -u proc-sys-fs-binfmt_misc.mount
带有mount的错误:/proc/proc/sys/fs/fs/binfmt_misc:Mount Point不存在。
我是我确认不存在ls -al/proc/sys/fs/binfmt_misc
。
由于我无法在/proc
中创建任何Dirs,因此缺少魔术可以使它起作用的是什么?
I am evaluating an NXP iMX.8 based (which is arm64v8) board. The eval kit came with a 5.10.72 Linux kernel but did not have binfmt_misc
kernel module. After contacting the vendor, they provided the needed module which matches the kernel version. I placed it into /lib/modules/$(uname -r)/kernel/drivers/fs/binfmt_misc.ko
then echo binfmt_misc >> /etc/modules && /sbin/depmod && systemctl reboot
.
After reboot, lsmod | grep binfmt
shows that the module is now loaded, but "Use By 0". Furthermore, journalctl -u proc-sys-fs-binfmt_misc.mount
errors out with mount: /proc/sys/fs/binfmt_misc: mount point does not exist.
which I confirm doesn't exist via ls -al /proc/sys/fs/binfmt_misc
.
Since I cannot create any dirs in /proc
, what is the missing magic to get this to work?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
看来该模块是单独编译的,并且内核本身不是使用
config_binfmt_misc
启用的,因此应创建此安装点的代码仍然被排除: https://elixir.bootlin.com/linux/linux/linux/v5.10.72/source/source/kernel/kernel/kernel/sysctl.c#l3304将BINFMT_MISC安装到其他位置并从那里使用它是可行的吗?还是向Teh供应商询问更新的内核图像?
It seems that the module was compiled separately and kernel itself was not built with
CONFIG_BINFMT_MISC
enabled, therefore the code that should create this mountpoint is still excluded: https://elixir.bootlin.com/linux/v5.10.72/source/kernel/sysctl.c#L3304Maybe it is feasible to mount binfmt_misc to some other location and use it from there? Or ask Teh Vendor for updated kernel image?
如果未定义
config_binfmt_misc
,则kernel/sysctl.c不会在procf中创建坐骑。拥有模块无济于事,因为它不会创建安装点。您将需要使用config_binfmt_misc = m
(或y)重建内核。请参阅: https://elixir.bootlin.com/ linux/v5.16.18/source/kernel/sysctl.c#l3367
If
CONFIG_BINFMT_MISC
is not defined, kernel/sysctl.c will not create a mountpoint in procfs. Having the module does not help, since it doesn't create the mount point. You will need to rebuild the kernel withCONFIG_BINFMT_MISC=m
(or Y).See: https://elixir.bootlin.com/linux/v5.16.18/source/kernel/sysctl.c#L3367