diff options
author | Frank Ch. Eigler <fche@elastic.org> | 2009-08-10 12:13:31 -0400 |
---|---|---|
committer | Frank Ch. Eigler <fche@elastic.org> | 2009-08-10 12:13:31 -0400 |
commit | 770e94e841ccaf6fc7446709b85d4152245ab5b9 (patch) | |
tree | 2be51913958c6898eb8f0388ccb57b1bd8ba9c57 | |
parent | 81b0eb8071ab21f554f0b154c1c58fcf186888c5 (diff) | |
download | systemtap-steved-770e94e841ccaf6fc7446709b85d4152245ab5b9.tar.gz systemtap-steved-770e94e841ccaf6fc7446709b85d4152245ab5b9.tar.xz systemtap-steved-770e94e841ccaf6fc7446709b85d4152245ab5b9.zip |
PR10506 experiment: use /sbin/insmod for uprobes.ko loading
* runtime/staprun/staprun.c (enable_uprobes): insmod, not insert_module().
-rw-r--r-- | runtime/staprun/staprun.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/runtime/staprun/staprun.c b/runtime/staprun/staprun.c index c64bf5b3..7eb7f28f 100644 --- a/runtime/staprun/staprun.c +++ b/runtime/staprun/staprun.c @@ -132,9 +132,14 @@ static int enable_uprobes(void) snprintf (runtimeko, sizeof(runtimeko), "%s/uprobes/uprobes.ko", (getenv("SYSTEMTAP_RUNTIME") ?: PKGDATADIR "/runtime")); dbug(2, "Inserting uprobes module from SystemTap runtime %s.\n", runtimeko); - argv[0] = NULL; + i = 0; + argv[i++] = "/sbin/insmod"; + argv[i++] = runtimeko; + argv[i] = NULL; + if (run_as(0, 0, 0, argv[0], argv) == 0) + return 0; - return insert_module(runtimeko, NULL, argv); + return 1; /* failure */ } static int insert_stap_module(void) |