/
usr
/
share
/
systemtap
/
tapset
/
/usr/share/systemtap/tapset
mkdir
upload
Name
Size
Mode
Actions
arm/
-
0755
rm
arm64/
-
0755
rm
bpf/
-
0755
rm
dyninst/
-
0755
rm
i386/
-
0755
rm
ia64/
-
0755
rm
linux/
-
0755
rm
mips/
-
0755
rm
powerpc/
-
0755
rm
riscv/
-
0755
rm
s390/
-
0755
rm
x86_64/
-
0755
rm
ansi.stp
4178
0644
edit
dl
rm
argv.stp
2721
0644
edit
dl
rm
choose_defined.stpm
208
0644
edit
dl
rm
container_of.stpm
235
0644
edit
dl
rm
context.stp
6103
0644
edit
dl
rm
errno.stp
9118
0644
edit
dl
rm
floatingpoint.stp
6936
0644
edit
dl
rm
indent-default.stp
59
0644
edit
dl
rm
indent.stp
4590
0644
edit
dl
rm
init.stp
269
0644
edit
dl
rm
input.stp
263
0644
edit
dl
rm
java.stp
1346
0644
edit
dl
rm
libperl5.26.3-64.stp
1339
0644
edit
dl
rm
libpython2.7-64.stp
522
0644
edit
dl
rm
livepatch.stp
3006
0644
edit
dl
rm
logging.stp
4132
0644
edit
dl
rm
macros.stpm
562
0644
edit
dl
rm
null.stp
17
0644
edit
dl
rm
offsetof.stpm
183
0644
edit
dl
rm
oneshot.stp
38
0644
edit
dl
rm
pn.stp
1588
0644
edit
dl
rm
print_stats.stpm
1719
0644
edit
dl
rm
private30.stpm
80
0644
edit
dl
rm
prometheus.stp
129
0644
edit
dl
rm
prometheus.stpm
8380
0644
edit
dl
rm
python.stp
474
0644
edit
dl
rm
python2.stp
29435
0644
edit
dl
rm
python3.stp
36655
0644
edit
dl
rm
queue_stats.stp
9487
0644
edit
dl
rm
random.stp
432
0644
edit
dl
rm
README
371
0644
edit
dl
rm
regex.stp
4107
0644
edit
dl
rm
registers.stp
11081
0644
edit
dl
rm
sizeof.stpm
212
0644
edit
dl
rm
speculative.stp
1746
0644
edit
dl
rm
sreg_arch.stpm
263
0644
edit
dl
rm
stap_staticmarkers.stp
9670
0644
edit
dl
rm
stopwatch.stp
3063
0644
edit
dl
rm
string.stp
7514
0644
edit
dl
rm
switchfile.stp
612
0644
edit
dl
rm
system.stp
593
0644
edit
dl
rm
this.stp
160
0644
edit
dl
rm
timers.stp
924
0644
edit
dl
rm
tls.stp
8099
0644
edit
dl
rm
tokenize.stp
2124
0644
edit
dl
rm
try_assign.stpm
768
0644
edit
dl
rm
type_defined.stpm
374
0644
edit
dl
rm
tzinfo.stp
930
0644
edit
dl
rm
uconversions-guru.stp
6078
0644
edit
dl
rm
uconversions.stp
36640
0644
edit
dl
rm
Edit:
/usr/share/systemtap/tapset/uconversions-guru.stp
(6078B)
/** * sfunction set_user_string - Writes a string to user memory * @addr: The user address to write the string to * @val: The string which is to be written * * Description: Writes the given string to a given user memory address. * Reports an error when writing to the given address fails. * Requires the use of guru mode (-g). */ function set_user_string (addr:long, val:string) %{ /* guru */ __label__ deref_fault; store_uderef_string (STAP_ARG_val, STAP_ARG_addr, MAXSTRINGLEN); if (0) { deref_fault: /* branched to from store_deref_string() */ snprintf (CONTEXT->error_buffer, sizeof(CONTEXT->error_buffer), "user string copy fault at 0x%lx [man error::fault]", (uintptr_t) STAP_ARG_addr); CONTEXT->last_error = CONTEXT->error_buffer; } %} /** * sfunction set_user_string_n - Writes a string of given length to user memory * @addr: The user address to write the string to * @n: The maximum length of the string * @val: The string which is to be written * * Description: Writes the given string up to a maximum given length to a given * user memory address. Reports an error on string copy fault. * Requires the use of guru mode (-g). */ function set_user_string_n (addr:long, n:long, val:string) %{ /* guru */ __label__ deref_fault; int64_t len = clamp_t(int64_t, STAP_ARG_n + 1, 1, MAXSTRINGLEN); store_uderef_string (STAP_ARG_val, STAP_ARG_addr, len); if (0) { deref_fault: /* branched to from store_deref_string() */ snprintf (CONTEXT->error_buffer, sizeof(CONTEXT->error_buffer), "user string copy fault at 0x%lx [man error::fault]", (uintptr_t) STAP_ARG_addr); CONTEXT->last_error = CONTEXT->error_buffer; } %} /** * sfunction set_user_string_arg - Writes a string to user memory. * @addr: The user address to write the string to * @val: The string which is to be written * * Description: Writes the given string to a given user memory address. * Reports a warning on string copy fault. * Requires the use of guru mode (-g). */ function set_user_string_arg (addr:long, val:string) { /* guru */ if (val != user_string_nofault(addr)) { try { set_user_string_n(addr, strlen(val), val) } catch { warn(sprintf("unable to write %s to 0x%lx", val, addr)) } } } /** * sfunction set_user_long - Writes a long value to user memory * @addr: The user address to write the long to * @val: The long which is to be written * * Description: Writes the long value to a given user memory address. * Reports an error when writing to the given address fails. * Requires the use of guru mode (-g). */ function set_user_long (addr:long, val:long) %{ /* guru */ __label__ deref_fault; uwrite((long *) (uintptr_t) STAP_ARG_addr, STAP_ARG_val); if (0) { deref_fault: /* branched to from uwrite() */ snprintf (CONTEXT->error_buffer, sizeof(CONTEXT->error_buffer), "user long copy fault at 0x%p [man error::fault]", (void *) (uintptr_t) STAP_ARG_addr); CONTEXT->last_error = CONTEXT->error_buffer; } %} /** * sfunction set_user_int - Writes an int value to user memory * @addr: The user address to write the int to * @val: The int which is to be written * * Description: Writes the int value to a given user memory address. * Reports an error when writing to the given address fails. * Requires the use of guru mode (-g). */ function set_user_int (addr:long, val:long) %{ /* guru */ __label__ deref_fault; uwrite((int *) (uintptr_t) STAP_ARG_addr, STAP_ARG_val); if (0) { deref_fault: /* branched to from uwrite() */ snprintf (CONTEXT->error_buffer, sizeof(CONTEXT->error_buffer), "user int copy fault at 0x%p [man error::fault]", (void *) (uintptr_t) STAP_ARG_addr); CONTEXT->last_error = CONTEXT->error_buffer; } %} /** * sfunction set_user_short - Writes a short value to user memory * @addr: The user address to write the short to * @val: The short which is to be written * * Description: Writes the short value to a given user memory address. * Reports an error when writing to the given address fails. * Requires the use of guru mode (-g). */ function set_user_short (addr:long, val:long) %{ /* guru */ __label__ deref_fault; uwrite((short *) (uintptr_t) STAP_ARG_addr, STAP_ARG_val); if (0) { deref_fault: /* branched to from uwrite() */ snprintf (CONTEXT->error_buffer, sizeof(CONTEXT->error_buffer), "user short copy fault at 0x%p [man error::fault]", (void *) (uintptr_t) STAP_ARG_addr); CONTEXT->last_error = CONTEXT->error_buffer; } %} /** * sfunction set_user_char - Writes a char value to user memory * @addr: The user address to write the char to * @val: The char which is to be written * * Description: Writes the char value to a given user memory address. * Reports an error when writing to the given address fails. * Requires the use of guru mode (-g). */ function set_user_char (addr:long, val:long) %{ /* guru */ __label__ deref_fault; uwrite((char *) (uintptr_t) STAP_ARG_addr, STAP_ARG_val); if (0) { deref_fault: /* branched to from uwrite() */ snprintf (CONTEXT->error_buffer, sizeof(CONTEXT->error_buffer), "user char copy fault at 0x%p [man error::fault]", (void *) (uintptr_t) STAP_ARG_addr); CONTEXT->last_error = CONTEXT->error_buffer; } %} /** * sfunction set_user_pointer - Writes a pointer value to user memory. * @addr: The user address to write the pointer to * @val: The pointer which is to be written * * Description: Writes the pointer value to a given user memory address. * Reports an error when writing to the given address fails. * Requires the use of guru mode (-g). */ function set_user_pointer (addr:long, val:long) %{ /* guru */ __label__ deref_fault; uwrite((void **) (uintptr_t) STAP_ARG_addr, (uintptr_t)STAP_ARG_val); if (0) { deref_fault: /* branched to from uwrite() */ snprintf (CONTEXT->error_buffer, sizeof(CONTEXT->error_buffer), "user pointer copy fault at 0x%p [man error::fault]", (void *) (uintptr_t) STAP_ARG_addr); CONTEXT->last_error = CONTEXT->error_buffer; } %}
Save
cmd:
run