]> sourceware.org Git - systemtap.git/commitdiff
Fix PR19990 by updating runtime/linux/access_process_vm.h.
authorDavid Smith <dsmith@redhat.com>
Mon, 25 Apr 2016 15:02:36 +0000 (10:02 -0500)
committerDavid Smith <dsmith@redhat.com>
Mon, 25 Apr 2016 15:02:36 +0000 (10:02 -0500)
* runtime/linux/access_process_vm.h (__access_process_vm_): Use
  get_user_pages_remote() when available.
* buildrun.cxx (compile_pass): Added export test for
  'get_user_pages_remote()'.

buildrun.cxx
runtime/linux/access_process_vm.h

index cac46d42ff8612b7fc1c2785aba7c2c5759832a5..30082ac841bfec42bf3236ef0cd0aba13a4844a8 100644 (file)
@@ -455,6 +455,7 @@ compile_pass (systemtap_session& s)
                  "STAPCONF_MODULE_LAYOUT", NULL);
   output_autoconf(s, o, "autoconf-mod_kallsyms.c",
                  "STAPCONF_MOD_KALLSYMS", NULL);
+  output_exportconf(s, o, "get_user_pages_remote", "STAPCONF_GET_USER_PAGES_REMOTE");
 
   o << module_cflags << " += -include $(STAPCONF_HEADER)" << endl;
 
index a2114c60d9c9aaecec52b482f2dc44bc4956f789..214d4e2546bfde5493bb79fd949aa81cef33e876 100644 (file)
@@ -32,7 +32,11 @@ __access_process_vm_ (struct task_struct *tsk, unsigned long addr, void *buf,
       int bytes, ret, offset;
       void *maddr;
 
+#ifdef STAPCONF_GET_USER_PAGES_REMOTE
+      ret = get_user_pages_remote (tsk, mm, addr, 1, write, 1, &page, &vma);
+#else
       ret = get_user_pages (tsk, mm, addr, 1, write, 1, &page, &vma);
+#endif
       if (ret <= 0)
        break;
 
This page took 0.032834 seconds and 5 git commands to generate.