Skip to content

Instantly share code, notes, and snippets.

@nomuken
Created June 13, 2016 06:32
Show Gist options
  • Save nomuken/c45973ab94f1900a51d1c708f13f80b4 to your computer and use it in GitHub Desktop.
Save nomuken/c45973ab94f1900a51d1c708f13f80b4 to your computer and use it in GitHub Desktop.
ArchLinux(Kernel 4.6.2-1-ARCH + gcc 6.1.1)向けVMwareのvmware-modconfigを通るようにするpatch達

これは何

ArchLinux(Kernel 4.6.2-1-ARCH + gcc 6.1.1)向けVMwareのvmware-modconfigを通るようにするpatch達です. ググった時に,見つかった解決方法を行うpatchです.

修正は次のURLで示されるやつを行いました.

使い方

  1. 次のファイルを解凍
  • /usr/lib/vmware/modules/source/vmnet.tar
  • /usr/lib/vmware/modules/source/vmmon.tar
  1. 解凍して出てきたフォルダにpatchを適用
  • patch -p1 -d vmnet-only < vmnet.patch
  • patch -p1 -d vmmon-only < vmmon.patch
  1. patchを適用したフォルダを再度圧縮
  • tar cvf vmmon.tar vmmon-only
  • tar cvf vmnet.tar vmnet-only
  1. 元の場所に上書きして配置
  • mv -f vm*.tar /usr/lib/vmware/modules/source/
diff -ur vmmon-only/linux/hostif.c vmmon-only.fix/linux/hostif.c
--- vmmon-only/linux/hostif.c 2016-04-15 08:48:44.000000000 +0900
+++ vmmon-only.fix/linux/hostif.c 2016-06-13 14:40:06.191997124 +0900
@@ -1162,7 +1162,7 @@
int retval;
down_read(&current->mm->mmap_sem);
- retval = get_user_pages(current, current->mm, (unsigned long)uvAddr,
+ retval = get_user_pages_remote(current, current->mm, (unsigned long)uvAddr,
numPages, 0, 0, ppages, NULL);
up_read(&current->mm->mmap_sem);
diff -ur vmnet-only/userif.c vmnet-only.fix/userif.c
--- vmnet-only/userif.c 2016-04-15 08:48:47.000000000 +0900
+++ vmnet-only.fix/userif.c 2016-06-13 14:41:16.418277663 +0900
@@ -113,7 +113,7 @@
int retval;
down_read(&current->mm->mmap_sem);
- retval = get_user_pages(current, current->mm, addr,
+ retval = get_user_pages_remote(current, current->mm, addr,
1, 1, 0, &page, NULL);
up_read(&current->mm->mmap_sem);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment