diff options
author | Frank Ch. Eigler <fche@elastic.org> | 2009-01-06 17:06:30 -0500 |
---|---|---|
committer | Frank Ch. Eigler <fche@elastic.org> | 2009-01-06 17:06:30 -0500 |
commit | 27053aa14ba234a0d5e1b4affd272a5c7b01aa1b (patch) | |
tree | 2c1849cbff5dc374eb981aaa973c6b9d8fa6e447 | |
parent | 6046b840e1b9e79ae535eb6027a98757be0673fa (diff) | |
download | systemtap-steved-27053aa14ba234a0d5e1b4affd272a5c7b01aa1b.tar.gz systemtap-steved-27053aa14ba234a0d5e1b4affd272a5c7b01aa1b.tar.xz systemtap-steved-27053aa14ba234a0d5e1b4affd272a5c7b01aa1b.zip |
PR9699: build fixes for kernel 2.6.28
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | buildrun.cxx | 3 | ||||
-rw-r--r-- | runtime/ChangeLog | 5 | ||||
-rw-r--r-- | runtime/autoconf-task-uid.c | 5 | ||||
-rw-r--r-- | runtime/transport/ChangeLog | 5 | ||||
-rw-r--r-- | runtime/transport/transport.c | 7 |
6 files changed, 29 insertions, 2 deletions
@@ -1,3 +1,9 @@ +2009-01-06 Frank Ch. Eigler <fche@elastic.org> + + PR9699. + * buildrun.cxx (compile_pass): Add $(LINUXINCLUDES) to autoconf + trial builds. Add new autoconf test for task_struct uid->cred switch. + 2009-01-05 Dave Brolley <brolley@redhat.com> PR9702 diff --git a/buildrun.cxx b/buildrun.cxx index 93e8c0cc..c626cf2a 100644 --- a/buildrun.cxx +++ b/buildrun.cxx @@ -86,7 +86,7 @@ compile_pass (systemtap_session& s) o << "_KBUILD_CFLAGS := $(call flags,KBUILD_CFLAGS)" << endl; o << "stap_check_gcc = $(shell " << superverbose << " if $(CC) $(1) -S -o /dev/null -xc /dev/null > /dev/null 2>&1; then echo \"$(1)\"; else echo \"$(2)\"; fi)" << endl; - o << "stap_check_build = $(shell " << superverbose << " if $(CC) $(KBUILD_CPPFLAGS) $(CPPFLAGS) $(_KBUILD_CFLAGS) $(CFLAGS_KERNEL) $(EXTRA_CFLAGS) $(CFLAGS) -DKBUILD_BASENAME=\\\"" << s.module_name << "\\\" -Werror -S -o /dev/null -xc $(1) " << redirecterrors << " ; then echo \"$(2)\"; else echo \"$(3)\"; fi)" << endl; + o << "stap_check_build = $(shell " << superverbose << " if $(CC) $(KBUILD_CPPFLAGS) $(CPPFLAGS) $(LINUXINCLUDE) $(_KBUILD_CFLAGS) $(CFLAGS_KERNEL) $(EXTRA_CFLAGS) $(CFLAGS) -DKBUILD_BASENAME=\\\"" << s.module_name << "\\\" -Werror -S -o /dev/null -xc $(1) " << redirecterrors << " ; then echo \"$(2)\"; else echo \"$(3)\"; fi)" << endl; o << "SYSTEMTAP_RUNTIME = \"" << s.runtime_path << "\"" << endl; @@ -120,6 +120,7 @@ compile_pass (systemtap_session& s) o << module_cflags << " += $(call stap_check_build, $(SYSTEMTAP_RUNTIME)/autoconf-oneachcpu-retry.c, -DSTAPCONF_ONEACHCPU_RETRY,)" << endl; o << module_cflags << " += $(call stap_check_build, $(SYSTEMTAP_RUNTIME)/autoconf-dpath-path.c, -DSTAPCONF_DPATH_PATH,)" << endl; o << module_cflags << " += $(call stap_check_build, $(SYSTEMTAP_RUNTIME)/autoconf-synchronize-sched.c, -DSTAPCONF_SYNCHRONIZE_SCHED,)" << endl; + o << module_cflags << " += $(call stap_check_build, $(SYSTEMTAP_RUNTIME)/autoconf-task-uid.c, -DSTAPCONF_TASK_UID,)" << endl; #if 0 /* NB: For now, the performance hit of probe_kernel_read/write (vs. our diff --git a/runtime/ChangeLog b/runtime/ChangeLog index ca852d53..fad46be1 100644 --- a/runtime/ChangeLog +++ b/runtime/ChangeLog @@ -1,3 +1,8 @@ +2009-01-06 Frank Ch. Eigler <fche@elastic.org> + + PR9699. + * autoconf-task-uid.c: New test. + 2008-12-21 Stan Cox <scox@redhat.com> * sduprobes.h (STAP_PROBE): Put block around probe point. diff --git a/runtime/autoconf-task-uid.c b/runtime/autoconf-task-uid.c new file mode 100644 index 00000000..5f5a321c --- /dev/null +++ b/runtime/autoconf-task-uid.c @@ -0,0 +1,5 @@ +#include <linux/sched.h> + +struct task_struct *foo; +void bar () { foo->uid = 0; } +/* as opposed to linux/cred.h wrappers current_uid() etc. */ diff --git a/runtime/transport/ChangeLog b/runtime/transport/ChangeLog index c6dfa005..e8e2a047 100644 --- a/runtime/transport/ChangeLog +++ b/runtime/transport/ChangeLog @@ -1,3 +1,8 @@ +2009-01-06 Frank Ch. Eigler <fche@elastic.org> + + PR9699. + * transport.c (_stp_transport_init): Adapt to task_struct cred switch. + 2008-11-28 Frank Ch. Eigler <fche@elastic.org> PR5947: make code -Wpointer-arith clean diff --git a/runtime/transport/transport.c b/runtime/transport/transport.c index 9f7a25f2..f5ee2c36 100644 --- a/runtime/transport/transport.c +++ b/runtime/transport/transport.c @@ -2,7 +2,7 @@ * transport.c - stp transport functions * * Copyright (C) IBM Corporation, 2005 - * Copyright (C) Red Hat Inc, 2005-2008 + * Copyright (C) Red Hat Inc, 2005-2009 * Copyright (C) Intel Corporation, 2006 * * This file is part of systemtap, and is free software. You can @@ -211,8 +211,13 @@ int _stp_transport_init(void) dbug_trans(1, "transport_init\n"); _stp_init_pid = current->pid; +#ifdef STAPCONF_TASK_UID _stp_uid = current->uid; _stp_gid = current->gid; +#else + _stp_uid = current_uid(); + _stp_gid = current_gid(); +#endif #ifdef RELAY_GUEST /* Guest scripts use relay only for reporting warnings and errors */ |