This file is indexed.

/usr/share/systemtap/tapset/uconversions-guru.stp is in systemtap-common 3.1-3ubuntu0.1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
/**
 * 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 */
  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%p [man error::fault]", (void *) (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 */
  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%p [man error::fault]", (void *) (uintptr_t) STAP_ARG_addr);
    CONTEXT->last_error = CONTEXT->error_buffer;
  }
%}

/**
 * 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 */
  uwrite((long *) (intptr_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 */
  uwrite((int *) (intptr_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 */
  uwrite((short *) (intptr_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 */
  uwrite((char *) (intptr_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 */
  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;
  }
%}