V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
• 请不要在回答技术问题时复制粘贴 AI 生成的内容
guanyin8cnq12
V2EX  ›  程序员

关于内核模块函数 call_usermodehelper 的 wait 参数导致 kernel hanging

  •  
  •   guanyin8cnq12 · Jun 28, 2021 · 860 views
    This topic created in 1764 days ago, the information mentioned may be changed or developed.
    最近更换了一个新猫,内核是 4.4 的。 想编译内核模块,达到自启动脚本的目的。用到的函数是 call_usermodehelper, 参考这里。https://elixir.bootlin.com/linux/v4.4.197/source/kernel/kmod.c#L616

    问题:之前老猫内核是 3.10 版的,一切运行正常。新猫内核 4+,加入了 PLTs, 导致运行始终提示: 查看之前的帖子,https://v2ex.com/t/785417#reply1

    调用 call_usermodehelper(argv[0], argv, envp, UMH_WAIT_EXEC);
    发现 UMH_WAIT_EXEC 就是一个坑啊,如果运行不成功,会导致 kernel hanging 。

    后果: 现在猫,没法启动!!!!
    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   6043 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 39ms · UTC 02:04 · PVG 10:04 · LAX 19:04 · JFK 22:04
    ♥ Do have faith in what you're doing.