Linux vps-4302913.novaexata.com.br 3.10.0-1160.139.1.el7.tuxcare.els2.x86_64 #1 SMP Mon Nov 3 13:30:41 UTC 2025 x86_64
Apache
: 162.214.88.42 | : 216.73.216.156
166 Domain
7.3.33
wwnova
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
usr /
share /
systemtap /
runtime /
[ HOME SHELL ]
Name
Size
Permission
Action
dyninst
[ DIR ]
drwxr-xr-x
linux
[ DIR ]
drwxr-xr-x
transport
[ DIR ]
drwxr-xr-x
unwind
[ DIR ]
drwxr-xr-x
addr-map.c
523
B
-rw-r--r--
addr-map.h
723
B
-rw-r--r--
alloc.c
498
B
-rw-r--r--
arith.c
483
B
-rw-r--r--
common_probe_context.h
6.08
KB
-rw-r--r--
common_session_state.h
415
B
-rw-r--r--
compatdefs.h
3.02
KB
-rw-r--r--
copy.c
585
B
-rw-r--r--
debug.h
485
B
-rw-r--r--
io.c
508
B
-rw-r--r--
k_syms.h
182
B
-rw-r--r--
loc2c-runtime.h
8.96
KB
-rw-r--r--
map-gen.c
25.29
KB
-rw-r--r--
map-stat.c
3.38
KB
-rw-r--r--
map.c
14.1
KB
-rw-r--r--
map.h
5.78
KB
-rw-r--r--
mempool.c
2.58
KB
-rw-r--r--
namespaces.h
487
B
-rw-r--r--
pmap-gen.c
8.17
KB
-rw-r--r--
print.c
486
B
-rw-r--r--
print.h
680
B
-rw-r--r--
print_flush.c
4.29
KB
-rw-r--r--
probe_lock.h
498
B
-rw-r--r--
proc_fs_compatibility.h
2.22
KB
-rw-r--r--
procfs-probes.c
4.21
KB
-rw-r--r--
procfs-probes.h
674
B
-rw-r--r--
procfs.c
7.3
KB
-rw-r--r--
ptrace_compatibility.h
1.48
KB
-rw-r--r--
regs.c
4.18
KB
-rw-r--r--
regs.h
2.12
KB
-rw-r--r--
runtime.h
928
B
-rw-r--r--
runtime_context.h
669
B
-rw-r--r--
runtime_defines.h
3.5
KB
-rw-r--r--
stack-arm.c
1.65
KB
-rw-r--r--
stack-ia64.c
1.06
KB
-rw-r--r--
stack-mips.c
125
B
-rw-r--r--
stack-s390.c
2.25
KB
-rw-r--r--
stack.c
18.79
KB
-rw-r--r--
stat-common.c
8.29
KB
-rw-r--r--
stat.c
7.25
KB
-rw-r--r--
stat.h
1.92
KB
-rw-r--r--
stp_helper_lock.h
2.98
KB
-rw-r--r--
stp_string.c
8.15
KB
-rw-r--r--
stp_string.h
598
B
-rw-r--r--
stp_task_work.c
2.75
KB
-rw-r--r--
stp_utrace.c
94.13
KB
-rw-r--r--
stp_utrace.h
13.68
KB
-rw-r--r--
sym.c
34.44
KB
-rw-r--r--
sym.h
5.83
KB
-rw-r--r--
syscall.h
15.61
KB
-rw-r--r--
task_finder_vma.c
12.81
KB
-rw-r--r--
time.c
13.31
KB
-rw-r--r--
timer.c
481
B
-rw-r--r--
timer.h
482
B
-rw-r--r--
uidgid_compatibility.h
603
B
-rw-r--r--
unwind.c
46.51
KB
-rw-r--r--
utrace_compatibility.h
3.07
KB
-rw-r--r--
vma.c
8.83
KB
-rw-r--r--
vsprintf.c
22.98
KB
-rw-r--r--
vsprintf.h
1.47
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : vma.c
/* -*- linux-c -*- * VMA tracking and lookup functions. * * Copyright (C) 2005-2014 Red Hat Inc. * Copyright (C) 2006 Intel Corporation. * * This file is part of systemtap, and is free software. You can * redistribute it and/or modify it under the terms of the GNU General * Public License (GPL); either version 2, or (at your option) any * later version. */ #ifndef _STP_VMA_C_ #define _STP_VMA_C_ #include "sym.h" #include "stp_string.c" #include "task_finder_vma.c" #include <asm/uaccess.h> static void _stp_vma_match_vdso(struct task_struct *tsk) { /* vdso is arch specific */ #if defined(STAPCONF_MM_CONTEXT_VDSO) || defined(STAPCONF_MM_CONTEXT_VDSO_BASE) int i, j; if (tsk->mm) { struct _stp_module *found = NULL; #ifdef STAPCONF_MM_CONTEXT_VDSO unsigned long vdso_addr = (unsigned long) tsk->mm->context.vdso; #else unsigned long vdso_addr = tsk->mm->context.vdso_base; #endif dbug_task_vma(1,"tsk: %d vdso: 0x%lx\n", tsk->pid, vdso_addr); for (i = 0; i < _stp_num_modules && found == NULL; i++) { struct _stp_module *m = _stp_modules[i]; if (m->path[0] == '/' && m->num_sections == 1) { unsigned long notes_addr; int all_ok = 1; /* Assume that if the path's basename starts with 'vdso' * and ends with '.so', it is the vdso. * * Note that this logic should match up with the logic in * the find_vdso() function in translate.cxx. */ const char *name = strrchr(m->path, '/'); if (name) { const char *ext; name++; ext = strrchr(name, '.'); if (!ext || strncmp("vdso", name, 4) != 0 || strcmp(".so", ext) != 0) continue; } notes_addr = vdso_addr + m->build_id_offset; dbug_task_vma(1,"notes_addr %s: 0x%lx + 0x%lx = 0x%lx (len: %x)\n", m->path, vdso_addr, m->build_id_offset, notes_addr, m->build_id_len); for (j = 0; j < m->build_id_len; j++) { int rc; unsigned char b; /* * Why check CONFIG_UTRACE here? If we're using real * in-kernel utrace, we can always just call * get_user() (since tsk == current). * * Since we're only reading here, we can call * __access_process_vm_noflush(), which only calls * things that are exported. */ #ifdef CONFIG_UTRACE rc = copy_from_user(&b, (void*)(notes_addr + j), 1); #else if (tsk == current) { rc = copy_from_user(&b, (void*)(notes_addr + j), 1); } else { rc = (__access_process_vm_noflush(tsk, (notes_addr + j), &b, 1, 0) != 1); } #endif if (rc || b != m->build_id_bits[j]) { dbug_task_vma(1,"darn, not equal (rc=%d) at %d (0x%x != 0x%x)\n", rc, j, b, m->build_id_bits[j]); all_ok = 0; break; } } if (all_ok) found = m; } } if (found != NULL) { stap_add_vma_map_info(tsk, vdso_addr, vdso_addr + found->sections[0].size, "vdso", found); dbug_task_vma(1,"found vdso: %s\n", found->path); } } #endif /* STAPCONF_MM_CONTEXT_VDSO */ } #ifdef HAVE_TASK_FINDER /* exec callback, will try to match vdso for new process, will drop all vma maps for a process that disappears. */ static int _stp_vma_exec_cb(struct stap_task_finder_target *tgt, struct task_struct *tsk, int register_p, int process_p) { dbug_task_vma(1, "tsk %d:%d , register_p: %d, process_p: %d\n", tsk->pid, tsk->tgid, register_p, process_p); if (process_p) { if (register_p) _stp_vma_match_vdso(tsk); else stap_drop_vma_maps(tsk); } return 0; } /* mmap callback, will match new vma with _stp_module or register vma name. */ static int _stp_vma_mmap_cb(struct stap_task_finder_target *tgt, struct task_struct *tsk, char *path, struct dentry *dentry, unsigned long addr, unsigned long length, unsigned long offset, unsigned long vm_flags) { int i, res; struct _stp_module *module = NULL; const char *name = ((dentry != NULL) ? (char *)dentry->d_name.name : NULL); if (path == NULL || *path == '\0') /* unknown? */ path = (char *)name; /* we'll copy this soon, in ..._add_vma_... */ dbug_task_vma(1, "mmap_cb: tsk %d:%d path %s, addr 0x%08lx, length 0x%08lx, offset 0x%lx, flags 0x%lx\n", tsk->pid, tsk->tgid, path, addr, length, offset, vm_flags); // We are only interested in the first load of the whole module that // is executable. We register whether or not we know the module, // so we can later lookup the name given an address for this task. if (path != NULL && offset == 0 && (vm_flags & VM_EXEC) && stap_find_vma_map_info(tsk, addr, NULL, NULL, NULL, NULL) != 0) { for (i = 0; i < _stp_num_modules; i++) { // PR20433: papering over possibility of NULL pointers if (strcmp(path ?: "", _stp_modules[i]->path ?: "") == 0) { unsigned long vm_start = 0; unsigned long vm_end = 0; dbug_task_vma(1, "vm_cb: matched path %s to module (sec: %s)\n", path, _stp_modules[i]->sections[0].name); module = _stp_modules[i]; /* Make sure we really don't know about this module yet. If we do know, we might want to extend the coverage. */ res = stap_find_vma_map_info_user(tsk->group_leader, module, &vm_start, &vm_end, NULL); if (res == -ESRCH) res = stap_add_vma_map_info(tsk->group_leader, addr, addr + length, path, module); else if (res == 0 && vm_end + 1 == addr) res = stap_extend_vma_map_info(tsk->group_leader, vm_start, addr + length); /* VMA entries are allocated dynamically, this is fine, * since we are in a task_finder callback, which is in * user context. */ if (res != 0) { _stp_error ("Couldn't register module '%s' for pid %d (%d)\n", _stp_modules[i]->path, tsk->group_leader->pid, res); } return 0; } } /* None of the tracked modules matched, register without, * to make sure we can lookup the name later. Ignore errors, * we will just report unknown when asked and tables were * full. Restrict to target process when given to preserve * vma_map entry slots. */ if (_stp_target == 0 || _stp_target == tsk->group_leader->pid) { res = stap_add_vma_map_info(tsk->group_leader, addr, addr + length, path, NULL); dbug_task_vma(1, "registered '%s' for %d (res:%d) [%lx-%lx]\n", path, tsk->group_leader->pid, res, addr, addr + length); } } else if (path != NULL) { // Once registered, we may want to extend an earlier // registered region. A segment might be mapped with // different flags for different offsets. If so we want // to record the extended range so we can address more // precisely to module names and symbols. res = stap_extend_vma_map_info(tsk->group_leader, addr, addr + length); dbug_task_vma(1, "extended '%s' for %d (res:%d) [%lx-%lx]\n", path, tsk->group_leader->pid, res, addr, addr + length); } return 0; } /* munmap callback, removes vma map info. */ static int _stp_vma_munmap_cb(struct stap_task_finder_target *tgt, struct task_struct *tsk, unsigned long addr, unsigned long length) { /* Unconditionally remove vm map info, ignore if not present. */ stap_remove_vma_map_info(tsk->group_leader, addr); return 0; } #endif /* Initializes the vma tracker. */ static int _stp_vma_init(void) { int rc = 0; #ifdef HAVE_TASK_FINDER static struct stap_task_finder_target vmcb = { // NB: no .pid, no .procname filters here. // This means that we get a system-wide mmap monitoring // widget while the script is running. (The // system-wideness may be restricted by stap -c or // -x.) But this seems to be necessary if we want to // to stack tracebacks through arbitrary shared libraries. // // XXX: There may be an optimization opportunity // for executables (for which the main task-finder // callback should be sufficient). .pid = 0, .procname = NULL, .purpose = "vma tracking", .callback = &_stp_vma_exec_cb, .mmap_callback = &_stp_vma_mmap_cb, .munmap_callback = &_stp_vma_munmap_cb, .mprotect_callback = NULL }; rc = stap_initialize_vma_map (); if (rc != 0) { _stp_error("Couldn't initialize vma map: %d\n", rc); return rc; } dbug_task_vma(1, "registering vmcb (_stap_target: %d)\n", _stp_target); rc = stap_register_task_finder_target (& vmcb); if (rc != 0) _stp_error("Couldn't register task finder target: %d\n", rc); #endif return rc; } /* Get rid of the vma tracker (memory). */ static void _stp_vma_done(void) { #if defined(CONFIG_UTRACE) stap_destroy_vma_map(); #endif } #endif /* _STP_VMA_C_ */
Close