Linux server2.hpierson.com 3.10.0-1160.105.1.el7.x86_64 #1 SMP Thu Dec 7 15:39:45 UTC 2023 x86_64
Apache
: 162.0.216.123 | : 216.73.216.152
28 Domain
?7.4.33
yvffpqmy
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
usr /
share /
systemtap /
runtime /
linux /
[ HOME SHELL ]
Name
Size
Permission
Action
?;
uprobes
[ DIR ]
drwxr-xr-x
?;
uprobes2
[ DIR ]
drwxr-xr-x
access_process_vm.h
3.59
KB
-rw-r--r--
addr-map.c
8.03
KB
-rw-r--r--
alloc.c
15.02
KB
-rw-r--r--
arith.c
16.41
KB
-rw-r--r--
autoconf-alloc-percpu-align.c
118
B
-rw-r--r--
autoconf-asm-syscall.c
26
B
-rw-r--r--
autoconf-bio-bi_opf.c
824
B
-rw-r--r--
autoconf-blk-types.c
359
B
-rw-r--r--
autoconf-compat_sigaction.c
448
B
-rw-r--r--
autoconf-constant-tsc.c
63
B
-rw-r--r--
autoconf-cpu-clock.c
1.25
KB
-rw-r--r--
autoconf-dpath-path.c
121
B
-rw-r--r--
autoconf-from_kuid_munged.c
191
B
-rw-r--r--
autoconf-fs_supers-hlist.c
354
B
-rw-r--r--
autoconf-generated-compile.c
56
B
-rw-r--r--
autoconf-get_user_pages_remote...
1.51
KB
-rw-r--r--
autoconf-get_user_pages_remote...
1.3
KB
-rw-r--r--
autoconf-grsecurity.c
219
B
-rw-r--r--
autoconf-hlist-4args.c
296
B
-rw-r--r--
autoconf-hrtimer-getset-expire...
126
B
-rw-r--r--
autoconf-hrtimer-rel.c
87
B
-rw-r--r--
autoconf-hw_breakpoint_context...
315
B
-rw-r--r--
autoconf-inode-private.c
173
B
-rw-r--r--
autoconf-inode-rwsem.c
172
B
-rw-r--r--
autoconf-inode-uretprobes.c
264
B
-rw-r--r--
autoconf-kallsyms-on-each-symb...
192
B
-rw-r--r--
autoconf-kprobe-symbol-name.c
90
B
-rw-r--r--
autoconf-ktime-get-real.c
98
B
-rw-r--r--
autoconf-linux-sched_headers.c
1.64
KB
-rw-r--r--
autoconf-local-clock.c
1.25
KB
-rw-r--r--
autoconf-mm-context-vdso-base....
117
B
-rw-r--r--
autoconf-mm-context-vdso.c
114
B
-rw-r--r--
autoconf-mod_kallsyms.c
51
B
-rw-r--r--
autoconf-module-sect-attrs.c
158
B
-rw-r--r--
autoconf-module_layout.c
52
B
-rw-r--r--
autoconf-nameidata.c
96
B
-rw-r--r--
autoconf-netfilter-313b.c
602
B
-rw-r--r--
autoconf-netfilter-4_1.c
769
B
-rw-r--r--
autoconf-netfilter-4_4.c
1.43
KB
-rw-r--r--
autoconf-netfilter.c
422
B
-rw-r--r--
autoconf-old-inode-uprobes.c
357
B
-rw-r--r--
autoconf-oneachcpu-retry.c
957
B
-rw-r--r--
autoconf-pagefault_disable.c
137
B
-rw-r--r--
autoconf-perf-structpid.c
444
B
-rw-r--r--
autoconf-procfs-owner.c
158
B
-rw-r--r--
autoconf-real-parent.c
427
B
-rw-r--r--
autoconf-regset.c
239
B
-rw-r--r--
autoconf-relay-umode_t.c
730
B
-rw-r--r--
autoconf-relay_buf-per_cpu_ptr...
920
B
-rw-r--r--
autoconf-ring_buffer-flags.c
112
B
-rw-r--r--
autoconf-ring_buffer_lost_even...
296
B
-rw-r--r--
autoconf-ring_buffer_read_prep...
181
B
-rw-r--r--
autoconf-save-stack-trace-no-b...
498
B
-rw-r--r--
autoconf-save-stack-trace.c
501
B
-rw-r--r--
autoconf-smpcall-4args.c
166
B
-rw-r--r--
autoconf-smpcall-5args.c
169
B
-rw-r--r--
autoconf-stacktrace_ops-int-ad...
409
B
-rw-r--r--
autoconf-stacktrace_ops-warnin...
188
B
-rw-r--r--
autoconf-task-uid.c
152
B
-rw-r--r--
autoconf-task_work-struct.c
219
B
-rw-r--r--
autoconf-timerfd.c
232
B
-rw-r--r--
autoconf-trace-printk.c
151
B
-rw-r--r--
autoconf-tracepoint-strings.c
233
B
-rw-r--r--
autoconf-uaccess.c
28
B
-rw-r--r--
autoconf-udelay_simple.c
90
B
-rw-r--r--
autoconf-uidgid.c
50
B
-rw-r--r--
autoconf-unwind-stack-trace.c
326
B
-rw-r--r--
autoconf-uprobe-get-pc.c
374
B
-rw-r--r--
autoconf-utrace-regset.c
273
B
-rw-r--r--
autoconf-utrace-via-tracepoint...
1.67
KB
-rw-r--r--
autoconf-vm-area-pte.c
141
B
-rw-r--r--
autoconf-walk-stack.c
217
B
-rw-r--r--
autoconf-x86-fs.c
90
B
-rw-r--r--
autoconf-x86-gs.c
90
B
-rw-r--r--
autoconf-x86-uniregs.c
115
B
-rw-r--r--
autoconf-x86-xfs.c
91
B
-rw-r--r--
common_session_state.h
2.93
KB
-rw-r--r--
compat_net.h
858
B
-rw-r--r--
compat_structs.h
4.31
KB
-rw-r--r--
compat_unistd.h
60.25
KB
-rw-r--r--
copy.c
2.58
KB
-rw-r--r--
debug.h
2.5
KB
-rw-r--r--
io.c
4.6
KB
-rw-r--r--
itrace.c
14.53
KB
-rw-r--r--
kprobes.c
22.57
KB
-rw-r--r--
loc2c-runtime.h
23.87
KB
-rw-r--r--
map_list.h
1.19
KB
-rw-r--r--
map_runtime.h
4.12
KB
-rw-r--r--
namespaces.h
6.96
KB
-rw-r--r--
netfilter.c
1.38
KB
-rw-r--r--
perf.c
7.42
KB
-rw-r--r--
perf.h
1.22
KB
-rw-r--r--
perf_event_counter_context.c
336
B
-rw-r--r--
perf_probe_handler_nmi.c
278
B
-rw-r--r--
perf_read.h
959
B
-rw-r--r--
print.c
5.85
KB
-rw-r--r--
probe_lock.h
1.69
KB
-rw-r--r--
regs-ia64.c
3.65
KB
-rw-r--r--
regs.c
12.63
KB
-rw-r--r--
runtime.h
10.55
KB
-rw-r--r--
runtime_context.h
4.75
KB
-rw-r--r--
runtime_defines.h
1.02
KB
-rw-r--r--
stat_runtime.h
1.7
KB
-rw-r--r--
stp_tracepoint.c
11.07
KB
-rw-r--r--
stp_tracepoint.h
2.1
KB
-rw-r--r--
syscalls-common.h
976
B
-rw-r--r--
task_finder.c
52.17
KB
-rw-r--r--
task_finder2.c
53.5
KB
-rw-r--r--
task_finder_map.c
5.07
KB
-rw-r--r--
task_finder_stubs.c
2.38
KB
-rw-r--r--
task_work_compatibility.h
1.25
KB
-rw-r--r--
timer.c
2.15
KB
-rw-r--r--
timer.h
1.35
KB
-rw-r--r--
timer_compatibility.h
2.26
KB
-rw-r--r--
uprobes-common.c
15.21
KB
-rw-r--r--
uprobes-common.h
1.61
KB
-rw-r--r--
uprobes-inc.h
484
B
-rw-r--r--
uprobes-inode.c
22.79
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : stp_tracepoint.c
/* * stp_tracepoint.c * * SystemTap layer for registering various kernel tracepoint APIs. * * Copyright (C) 2014-2018 Red Hat Inc. * * Initially derived from lttng-tracepoints.c: * LTTng adaptation layer for Linux kernel 3.15+ tracepoints. * * Copyright (C) 2014 Mathieu Desnoyers <mathieu.desnoyers@efficios.com> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; only * version 2.1 of the License. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #include <linux/list.h> #include <linux/mutex.h> #include <linux/err.h> #include <linux/notifier.h> #include <linux/tracepoint.h> #include <linux/slab.h> #include <linux/jhash.h> #include <linux/module.h> #include "stp_tracepoint.h" /* * Protect the tracepoint table. stp_tracepoint_mutex nests within * kernel/tracepoint.c tp_modlist_mutex. kernel/tracepoint.c * tracepoint_mutex nests within stp_tracepoint_mutex. */ static DEFINE_MUTEX(stp_tracepoint_mutex); #define TRACEPOINT_HASH_BITS 6 #define TRACEPOINT_TABLE_SIZE (1 << TRACEPOINT_HASH_BITS) static struct hlist_head tracepoint_table[TRACEPOINT_TABLE_SIZE]; /* * The tracepoint entry is the node contained within the hash table. It * is a mapping from the "string" key to the struct tracepoint pointer. */ struct tracepoint_entry { struct hlist_node hlist; struct tracepoint *tp; int refcount; struct list_head probes; char name[0]; }; struct stp_tp_probe { struct tracepoint_func tp_func; struct list_head list; }; static int add_probe(struct tracepoint_entry *e, void *probe, void *data) { struct stp_tp_probe *p; int found = 0; list_for_each_entry(p, &e->probes, list) { if (p->tp_func.func == probe && p->tp_func.data == data) { found = 1; break; } } if (found) return -EEXIST; p = _stp_kmalloc_gfp(sizeof(struct stp_tp_probe), STP_ALLOC_SLEEP_FLAGS); if (!p) return -ENOMEM; p->tp_func.func = probe; p->tp_func.data = data; list_add(&p->list, &e->probes); return 0; } static int remove_probe(struct tracepoint_entry *e, void *probe, void *data) { struct stp_tp_probe *p; int found = 0; list_for_each_entry(p, &e->probes, list) { if (p->tp_func.func == probe && p->tp_func.data == data) { found = 1; break; } } if (found) { list_del(&p->list); _stp_kfree(p); return 0; } else { return -ENOENT; } } /* * Get tracepoint if the tracepoint is present in the tracepoint hash table. * Must be called with stp_tracepoint_mutex held. * Returns NULL if not present. */ static struct tracepoint_entry *get_tracepoint(const char *name) { struct hlist_head *head; struct tracepoint_entry *e; u32 hash = jhash(name, strlen(name), 0); head = &tracepoint_table[hash & (TRACEPOINT_TABLE_SIZE - 1)]; hlist_for_each_entry(e, head, hlist) { if (!strcmp(name, e->name)) return e; } return NULL; } /* * Add the tracepoint to the tracepoint hash table. Must be called with * stp_tracepoint_mutex held. */ static struct tracepoint_entry *add_tracepoint(const char *name) { struct hlist_head *head; struct tracepoint_entry *e; size_t name_len = strlen(name) + 1; u32 hash = jhash(name, name_len - 1, 0); head = &tracepoint_table[hash & (TRACEPOINT_TABLE_SIZE - 1)]; hlist_for_each_entry(e, head, hlist) { if (!strcmp(name, e->name)) { return ERR_PTR(-EEXIST); /* Already there */ } } /* * Using kmalloc here to allocate a variable length element. Could * cause some memory fragmentation if overused. */ e = _stp_kmalloc_gfp(sizeof(struct tracepoint_entry) + name_len, STP_ALLOC_SLEEP_FLAGS); if (!e) return ERR_PTR(-ENOMEM); memcpy(&e->name[0], name, name_len); e->tp = NULL; e->refcount = 0; INIT_LIST_HEAD(&e->probes); hlist_add_head(&e->hlist, head); return e; } /* * Remove the tracepoint from the tracepoint hash table. Must be called * with stp_tracepoint_mutex held. */ static void remove_tracepoint(struct tracepoint_entry *e) { hlist_del(&e->hlist); _stp_kfree(e); } static void do_tracepoint_probe_register(struct tracepoint *tp, void *probe, void *data) { int ret = tracepoint_probe_register(tp, probe, data); if (ret) { dbug_tp(1, "error (%d) registering probe '%s'\n", ret, tp->name); } else { dbug_tp(2, "registered probe '%s'\n", tp->name); } } static void do_tracepoint_probe_unregister(struct tracepoint *tp, void *probe, void *data) { int ret = tracepoint_probe_unregister(tp, probe, data); if (ret) { dbug_tp(1, "error (%d) unregistering probe '%s'\n", ret, tp->name); } else { dbug_tp(2, "unregistered probe '%s'\n", tp->name); } } int stp_tracepoint_probe_register(const char *name, void *probe, void *data) { struct tracepoint_entry *e; int ret = 0; might_sleep(); mutex_lock(&stp_tracepoint_mutex); e = get_tracepoint(name); if (!e) { e = add_tracepoint(name); if (IS_ERR(e)) { ret = PTR_ERR(e); goto end; } } /* add (probe, data) to entry */ ret = add_probe(e, probe, data); if (ret) goto end; e->refcount++; dbug_tp(2, "added probe on '%s'\n", name); if (e->tp) { do_tracepoint_probe_register(e->tp, probe, data); } end: mutex_unlock(&stp_tracepoint_mutex); if (ret) { dbug_tp(1, "error (%d) adding probe on '%s'\n", ret, name); } return ret; } int stp_tracepoint_probe_unregister(const char *name, void *probe, void *data) { struct tracepoint_entry *e; int ret = 0; might_sleep(); mutex_lock(&stp_tracepoint_mutex); e = get_tracepoint(name); if (!e) { ret = -ENOENT; goto end; } /* remove (probe, data) from entry */ ret = remove_probe(e, probe, data); if (ret) goto end; if (e->tp) { do_tracepoint_probe_unregister(e->tp, probe, data); } if (!--e->refcount) remove_tracepoint(e); dbug_tp(2, "removed probe on '%s'\n", name); end: mutex_unlock(&stp_tracepoint_mutex); if (ret) { dbug_tp(1, "error (%d) removing probe on '%s'\n", ret, name); } return ret; } #ifdef CONFIG_MODULES static int stp_tracepoint_coming(struct tp_module *tp_mod) { int i; might_sleep(); mutex_lock(&stp_tracepoint_mutex); for (i = 0; i < tp_mod->mod->num_tracepoints; i++) { struct tracepoint *tp; struct tracepoint_entry *e; struct stp_tp_probe *p; #ifdef CONFIG_HAVE_ARCH_PREL32_RELOCATIONS tp = offset_to_ptr(&(((const int*)(tp_mod->mod->tracepoints_ptrs))[i])); #else tp = tp_mod->mod->tracepoints_ptrs[i]; #endif e = get_tracepoint(tp->name); if (!e) { e = add_tracepoint(tp->name); if (IS_ERR(e)) { dbug_tp(1, "error (%ld) adding %s:%s\n", PTR_ERR(e), tp_mod->mod->name, tp->name); continue; } } /* If already enabled, just check consistency */ if (e->tp) { if (e->tp != tp) { dbug_tp(1, "found duplicate '%s'\n", tp->name); } continue; } e->tp = tp; e->refcount++; dbug_tp(2, "added %s:%s\n", tp_mod->mod->name, tp->name); /* register each (probe, data) */ list_for_each_entry(p, &e->probes, list) { do_tracepoint_probe_register(e->tp, p->tp_func.func, p->tp_func.data); } } mutex_unlock(&stp_tracepoint_mutex); return 0; } static int stp_tracepoint_going(struct tp_module *tp_mod) { int i; might_sleep(); mutex_lock(&stp_tracepoint_mutex); for (i = 0; i < tp_mod->mod->num_tracepoints; i++) { struct tracepoint *tp; struct tracepoint_entry *e; struct stp_tp_probe *p; #ifdef CONFIG_HAVE_ARCH_PREL32_RELOCATIONS tp = offset_to_ptr(&(((const int*)(tp_mod->mod->tracepoints_ptrs))[i])); #else tp = tp_mod->mod->tracepoints_ptrs[i]; #endif e = get_tracepoint(tp->name); if (!e || !e->tp) continue; /* unregister each (probe, data) */ list_for_each_entry(p, &e->probes, list) { do_tracepoint_probe_unregister(e->tp, p->tp_func.func, p->tp_func.data); } e->tp = NULL; if (!--e->refcount) remove_tracepoint(e); dbug_tp(2, "removed %s:%s\n", tp_mod->mod->name, tp->name); } mutex_unlock(&stp_tracepoint_mutex); return 0; } static int stp_tracepoint_notify(struct notifier_block *self, unsigned long val, void *data) { struct tp_module *tp_mod = data; int ret = 0; switch (val) { case MODULE_STATE_COMING: ret = stp_tracepoint_coming(tp_mod); break; case MODULE_STATE_GOING: ret = stp_tracepoint_going(tp_mod); break; default: break; } return ret; } static struct notifier_block stp_tracepoint_notifier = { .notifier_call = stp_tracepoint_notify, .priority = 0, }; static int stp_tracepoint_module_init(void) { return register_tracepoint_module_notifier(&stp_tracepoint_notifier); } static void stp_tracepoint_module_exit(void) { (void)unregister_tracepoint_module_notifier(&stp_tracepoint_notifier); } #else /* #ifdef CONFIG_MODULES */ static int stp_tracepoint_module_init(void) { return 0; } static void stp_tracepoint_module_exit(void) { } #endif /* #else #ifdef CONFIG_MODULES */ static void stp_kernel_tracepoint_add(struct tracepoint *tp, void *priv) { struct tracepoint_entry *e; struct stp_tp_probe *p; int *ret = priv; might_sleep(); mutex_lock(&stp_tracepoint_mutex); e = get_tracepoint(tp->name); if (!e) { e = add_tracepoint(tp->name); if (IS_ERR(e)) { dbug_tp(1, "error (%ld) adding kernel:%s\n", PTR_ERR(e), tp->name); *ret = (int) PTR_ERR(e); goto end; } } /* If already enabled, just check consistency */ if (e->tp) { if (e->tp != tp) { dbug_tp(1, "found duplicate '%s'\n", tp->name); } goto end; } e->tp = tp; e->refcount++; dbug_tp(2, "added kernel:%s\n", tp->name); /* register each (probe, data) */ list_for_each_entry(p, &e->probes, list) { do_tracepoint_probe_register(e->tp, p->tp_func.func, p->tp_func.data); } end: mutex_unlock(&stp_tracepoint_mutex); } static void stp_kernel_tracepoint_remove(struct tracepoint *tp, void *priv) { struct tracepoint_entry *e; int *ret = priv; might_sleep(); mutex_lock(&stp_tracepoint_mutex); e = get_tracepoint(tp->name); if (!e || e->refcount != 1 || !list_empty(&e->probes)) { *ret = -EINVAL; goto end; } remove_tracepoint(e); dbug_tp(2, "removed kernel:%s\n", tp->name); end: mutex_unlock(&stp_tracepoint_mutex); } static int stp_tracepoint_init(void) { int error_ret = 0; int ret = 0; for_each_kernel_tracepoint(stp_kernel_tracepoint_add, &ret); if (!ret) ret = stp_tracepoint_module_init(); if (!ret) return 0; for_each_kernel_tracepoint(stp_kernel_tracepoint_remove, &error_ret); return ret; } static void stp_tracepoint_exit(void) { int i, ret = 0; stp_tracepoint_module_exit(); for_each_kernel_tracepoint(stp_kernel_tracepoint_remove, &ret); might_sleep(); mutex_lock(&stp_tracepoint_mutex); for (i = 0; i < TRACEPOINT_TABLE_SIZE; i++) { struct hlist_head *head = &tracepoint_table[i]; /* All tracepoints should be removed */ if (!hlist_empty(head)) { dbug_tp(1, "tracepoint_table[%d] is not empty!\n", i); } } mutex_unlock(&stp_tracepoint_mutex); }
Close