VMware 内核模块更新程序错误

VMware 内核模块更新程序错误

我在用Fedora 29和内核版本Linux 5.0.16-200.fc29.x86_64. 在内核更新之前,VMware Workstation 14.1.7运行正常,但更新后,它给出了VMware 内核模块更新程序消息,尝试更新时出现错误。还尝试过

sudo vmware-modconfig --console --install-all 

从控制台。

以下是控制台中的错误

/tmp/modconfig-NqEL4M/vmmon-only/linux/hostif.c:1502:25: error: ‘totalram_pages’ redeclared as different kind of symbol
    extern unsigned long totalram_pages;

/tmp/modconfig-NqEL4M/vmmon-only/linux/hostif.c:1648:4: error: implicit declaration of function ‘do_gettimeofday’; did you mean ‘do_settimeofday64’? [-Werror=implicit-function-declaration]
    do_gettimeofday(&tv);

/tmp/modconfig-NqEL4M/vmmon-only/linux/hostif.c:3203:40: error: macro "access_ok" passed 3 arguments, but takes just 2
    if (!access_ok(VERIFY_WRITE, p, size)) {
                                        ^
/tmp/modconfig-NqEL4M/vmmon-only/linux/hostif.c:3203:9: error: ‘access_ok’ undeclared (first use in this function)
    if (!access_ok(VERIFY_WRITE, p, size)) {

/tmp/modconfig-NqEL4M/vmnet-only/userif.c:145:52: error: macro "access_ok" passed 3 arguments, but takes just 2
    if (!access_ok(VERIFY_WRITE, (void *)uAddr, size) ||
                                                    ^
/tmp/modconfig-NqEL4M/vmnet-only/userif.c:145:9: error: ‘access_ok’ undeclared (first use in this function)
    if (!access_ok(VERIFY_WRITE, (void *)uAddr, size) ||

谢谢大家。

答案1

Linux 内核“access_ok”宏已经丢弃了第一个参数“type”,因此 VMware 模块源代码需要进行调整。

如果你无法将 VMware 版本更新到 15.1,我建议从https://github.com/mkubecek/vmware-host-modules.git

参考:https://communities.vmware.com/thread/609330

相关内容