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 /
dyninst /
[ HOME SHELL ]
Name
Size
Permission
Action
addr-map.c
525
B
-rw-r--r--
alloc.c
1.16
KB
-rw-r--r--
arith.c
2.24
KB
-rw-r--r--
common_session_state.h
6.76
KB
-rw-r--r--
copy.c
4
KB
-rw-r--r--
debug.h
413
B
-rw-r--r--
ilog2.h
2.87
KB
-rw-r--r--
io.c
4.43
KB
-rw-r--r--
linux_defs.h
5.58
KB
-rw-r--r--
linux_hash.h
1.83
KB
-rw-r--r--
linux_types.h
654
B
-rw-r--r--
loc2c-runtime.h
2.44
KB
-rw-r--r--
map_list.h
1.03
KB
-rw-r--r--
map_runtime.h
5.04
KB
-rw-r--r--
namespaces.h
0
B
-rw-r--r--
offptr.h
4.68
KB
-rw-r--r--
offset_list.h
4.32
KB
-rw-r--r--
perf.c
0
B
-rw-r--r--
print.c
2.37
KB
-rw-r--r--
probe_lock.h
1.81
KB
-rw-r--r--
regs.c
2.14
KB
-rw-r--r--
runtime.h
9.49
KB
-rw-r--r--
runtime_context.h
6.4
KB
-rw-r--r--
runtime_defines.h
235
B
-rw-r--r--
session_attributes.c
1.68
KB
-rw-r--r--
session_attributes.h
772
B
-rw-r--r--
shm.c
6.03
KB
-rw-r--r--
stapdyn.h
3.37
KB
-rw-r--r--
stat_runtime.h
1.79
KB
-rw-r--r--
sym.c
40
B
-rw-r--r--
task_finder.c
0
B
-rw-r--r--
timer.c
2.71
KB
-rw-r--r--
transport.c
30.4
KB
-rw-r--r--
transport.h
3.88
KB
-rw-r--r--
unwind.c
0
B
-rw-r--r--
uprobes-regs.c
1.94
KB
-rw-r--r--
uprobes.c
1.76
KB
-rw-r--r--
uprobes.h
953
B
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : copy.c
/* -*- linux-c -*- * Copy from user space functions * Copyright (C) 2012 Red Hat Inc. * * 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 _STAPDYN_COPY_C_ #define _STAPDYN_COPY_C_ #include <unistd.h> #include <sys/syscall.h> #include <sys/uio.h> #include "stp_string.c" static int _stp_mem_fd = -1; static inline __must_check ssize_t __self_readv(const struct iovec *lvec, unsigned long liovcnt, const struct iovec *rvec, unsigned long riovcnt) { #if !__GLIBC_PREREQ(2, 15) #ifdef __NR_process_vm_readv #define process_vm_readv(...) \ syscall(__NR_process_vm_readv, __VA_ARGS__) #else #define process_vm_readv(...) \ ({ (void)lvec; (void)liovcnt; \ (void)rvec; (void)riovcnt; \ errno = ENOSYS; -1 }) #endif #endif return process_vm_readv(getpid(), lvec, liovcnt, rvec, riovcnt, 0UL); } static inline __must_check ssize_t __self_writev(const struct iovec *lvec, unsigned long liovcnt, const struct iovec *rvec, unsigned long riovcnt) { #if !__GLIBC_PREREQ(2, 15) #ifdef __NR_process_vm_writev #define process_vm_writev(...) \ syscall(__NR_process_vm_writev, __VA_ARGS__) #else #define process_vm_writev(...) \ ({ (void)lvec; (void)liovcnt; \ (void)rvec; (void)riovcnt; \ errno = ENOSYS; -1 }) #endif #endif return process_vm_writev(getpid(), lvec, liovcnt, rvec, riovcnt, 0UL); } static int _stp_copy_init(void) { /* Try a no-op process_vm_readv/writev to make sure they're available, * esp. not ENOSYS, then we don't need to bother /proc/self/mem. */ if ((__self_readv(NULL, 0, NULL, 0) == 0) && (__self_writev(NULL, 0, NULL, 0) == 0)) return 0; _stp_mem_fd = open("/proc/self/mem", O_RDWR /*| O_LARGEFILE*/); if (_stp_mem_fd < 0) return -errno; fcntl(_stp_mem_fd, F_SETFD, FD_CLOEXEC); return 0; } static void _stp_copy_destroy(void) { if (_stp_mem_fd >= 0) { close (_stp_mem_fd); _stp_mem_fd = -1; } } static inline __must_check long __copy_from_user(void *to, const void __user * from, unsigned long n) { int rc = 0; if (_stp_mem_fd >= 0) { /* pread is like lseek+read, without racing other threads. */ if (pread(_stp_mem_fd, to, n, (off_t)(uintptr_t)from) != n) rc = -EFAULT; } else { struct iovec lvec = { .iov_base = to, .iov_len = n }; struct iovec rvec = { .iov_base = (void *)from, .iov_len = n }; if (__self_readv(&lvec, 1, &rvec, 1) != n) rc = -EFAULT; } return rc; } static inline __must_check long __copy_to_user(void *to, const void *from, unsigned long n) { int rc = 0; if (_stp_mem_fd >= 0) { /* pwrite is like lseek+write, without racing other threads. */ /* NB: some kernels will refuse to write /proc/self/mem */ if (pwrite(_stp_mem_fd, from, n, (off_t)(uintptr_t)to) != n) rc = -EFAULT; } else { struct iovec lvec = { .iov_base = (void *)from, .iov_len = n }; struct iovec rvec = { .iov_base = to, .iov_len = n }; if (__self_writev(&lvec, 1, &rvec, 1) != n) rc = -EFAULT; } return rc; } static long _stp_strncpy_from_user(char *dst, const char *src, long count) { if (count <= 0) return -EINVAL; /* Reads are batched on aligned 4k boundaries, approximately * page size, to reduce the number of pread syscalls. It will * likely read past the terminating '\0', but shouldn't fault. * NB: We shouldn't try to read the entire 'count' at once, in * case some small string is already near the end of its page. */ long i = 0; while (i < count) { long n = 0x1000 - ((long)(src + i) & 0xFFF); n = min(n, count - i); if (__copy_from_user(dst + i, src + i, n)) return -EFAULT; char *dst0 = memchr(dst + i, 0, n); if (dst0 != NULL) return (dst0 - dst); i += n; } dst[i - 1] = 0; return i - 1; } static unsigned long _stp_copy_from_user(char *dst, const char *src, unsigned long count) { if (count && __copy_from_user(dst, src, count) == 0) return 0; return count; } #endif /* _STAPDYN_COPY_C_ */
Close