summaryrefslogtreecommitdiffstats
path: root/runtime
diff options
context:
space:
mode:
authorDave Brolley <brolley@redhat.com>2010-01-15 10:57:08 -0500
committerDave Brolley <brolley@redhat.com>2010-01-15 10:57:08 -0500
commitceeefadd6874e3d315669a87ec0d05a0ce1f7094 (patch)
treefad469e3f31212afee4d1fb6aa6833b48e1724b7 /runtime
parent3f78f0208e1bfe8061d1898418882b5e2756f8a2 (diff)
parent86f99ad8206574dc6400d48563db58341cb50f52 (diff)
downloadsystemtap-steved-ceeefadd6874e3d315669a87ec0d05a0ce1f7094.tar.gz
systemtap-steved-ceeefadd6874e3d315669a87ec0d05a0ce1f7094.tar.xz
systemtap-steved-ceeefadd6874e3d315669a87ec0d05a0ce1f7094.zip
Merge branch 'master' of ssh://sources.redhat.com/git/systemtap
Conflicts: stap-client
Diffstat (limited to 'runtime')
-rw-r--r--runtime/stack.c3
-rw-r--r--runtime/staprun/modverify.c10
-rw-r--r--runtime/uprobes-common.c15
-rw-r--r--runtime/uprobes-common.h1
4 files changed, 26 insertions, 3 deletions
diff --git a/runtime/stack.c b/runtime/stack.c
index 7dfeb76a..0e537a8e 100644
--- a/runtime/stack.c
+++ b/runtime/stack.c
@@ -212,7 +212,8 @@ void _stp_stack_print_tsk(struct task_struct *tsk, int verbose, int levels)
for (i = 0; i < maxLevels; ++i) {
if (backtrace[i] == 0 || backtrace[i] == ULONG_MAX)
break;
- _stp_printf("%lx ", backtrace[i]);
+ _stp_symbol_print(backtrace[i]);
+ _stp_print_char('\n');
}
#endif
}
diff --git a/runtime/staprun/modverify.c b/runtime/staprun/modverify.c
index a17bb2ec..5d442393 100644
--- a/runtime/staprun/modverify.c
+++ b/runtime/staprun/modverify.c
@@ -272,12 +272,18 @@ int verify_module (const char *signatureName, const char* module_name,
/* Verify the permissions of the certificate database and its files. */
if (! check_cert_db_permissions (dbdir))
- return MODULE_UNTRUSTED;
+ {
+ if (verbose>1) fprintf (stderr, "Certificate db %s permissions too loose\n", dbdir);
+ return MODULE_UNTRUSTED;
+ }
/* Get the size of the signature file. */
prStatus = PR_GetFileInfo (signatureName, &info);
if (prStatus != PR_SUCCESS || info.type != PR_FILE_FILE || info.size < 0)
- return MODULE_UNTRUSTED; /* Not signed */
+ {
+ if (verbose>1) fprintf (stderr, "Signature file %s not found\n", signatureName);
+ return MODULE_UNTRUSTED; /* Not signed */
+ }
/* Open the signature file. */
local_file_fd = PR_Open (signatureName, PR_RDONLY, 0);
diff --git a/runtime/uprobes-common.c b/runtime/uprobes-common.c
index b0273ba4..58e3a05f 100644
--- a/runtime/uprobes-common.c
+++ b/runtime/uprobes-common.c
@@ -286,4 +286,19 @@ static int stap_uprobe_munmap_found (struct stap_task_finder_target *tgt, struct
return stap_uprobe_change_minus (tsk, addr, length, stf);
}
+/* The task_finder_callback we use for ET_DYN targets.
+ This just forces an unmap of everything as the process exits.
+ (PR11151) */
+static int stap_uprobe_process_munmap (struct stap_task_finder_target *tgt, struct task_struct *tsk, int register_p, int process_p) {
+ const struct stap_uprobe_tf *stf = container_of(tgt, struct stap_uprobe_tf, finder);
+ if (! process_p) return 0; /* ignore threads */
+ #ifdef DEBUG_TASK_FINDER_VMA
+ _stp_dbug (__FUNCTION__,__LINE__, "%cproc pid %d stf %p %p path %s\n", register_p?'+':'-', tsk->tgid, tgt, stf, stf->pathname);
+ #endif
+ /* Covering 0->TASK_SIZE means "unmap everything" */
+ if (!register_p)
+ return stap_uprobe_change_minus (tsk, 0, TASK_SIZE, stf);
+ return 0;
+}
+
#endif /* _UPROBE_COMMON_C_ */
diff --git a/runtime/uprobes-common.h b/runtime/uprobes-common.h
index 68741f4d..990b473a 100644
--- a/runtime/uprobes-common.h
+++ b/runtime/uprobes-common.h
@@ -33,5 +33,6 @@ struct stap_uprobe_spec {
static int stap_uprobe_process_found (struct stap_task_finder_target *tgt, struct task_struct *tsk, int register_p, int process_p);
static int stap_uprobe_mmap_found (struct stap_task_finder_target *tgt, struct task_struct *tsk, char *path, unsigned long addr, unsigned long length, unsigned long offset, unsigned long vm_flags);
static int stap_uprobe_munmap_found (struct stap_task_finder_target *tgt, struct task_struct *tsk, unsigned long addr, unsigned long length);
+static int stap_uprobe_process_munmap (struct stap_task_finder_target *tgt, struct task_struct *tsk, int register_p, int process_p);
#endif /* _UPROBE_COMMON_H_ */