From 64211010978d0e35c80ec7c119f1986a48f97543 Mon Sep 17 00:00:00 2001 From: Dave Brolley Date: Mon, 9 Nov 2009 14:50:52 -0500 Subject: Don't reference global variable modpath in insert_module and its helpers. This allows insert_module to to be used for loading the signed uprobes.ko module. Allow the use of $$parms and $$return in uprobes based probes for unprivileged users. Re-add management of module signatures in the cache. Don't know why it was removed. --- runtime/staprun/staprun.h | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'runtime/staprun/staprun.h') diff --git a/runtime/staprun/staprun.h b/runtime/staprun/staprun.h index 9cdbc861..91761bde 100644 --- a/runtime/staprun/staprun.h +++ b/runtime/staprun/staprun.h @@ -131,8 +131,28 @@ time_t read_backlog(int cpu, int fnum); /* staprun_funcs.c */ void setup_staprun_signals(void); const char *moderror(int err); + +/* insert_module helper functions. */ +typedef void (*assert_permissions_func) ( + const char *module_path __attribute__ ((unused)), + const void *module_data __attribute__ ((unused)), + off_t module_size __attribute__ ((unused)) +); + +void assert_stap_module_permissions ( + const char *module_path __attribute__ ((unused)), + const void *module_data __attribute__ ((unused)), + off_t module_size __attribute__ ((unused)) +); + +void assert_uprobes_module_permissions ( + const char *module_path __attribute__ ((unused)), + const void *module_data __attribute__ ((unused)), + off_t module_size __attribute__ ((unused)) +); int insert_module(const char *path, const char *special_options, - char **options); + char **options, assert_permissions_func apf); + int mountfs(void); void start_symbol_thread(void); void stop_symbol_thread(void); -- cgit