|
|
@@ -630,8 +630,8 @@ int uprobe_writeSubset(struct pt_regs *ctx) {
|
|
|
}
|
|
|
|
|
|
if (len < (size - CW_HEADER_VAL_LENGTH - CW_HEADER_KEY_LENGTH - 4)) { // 4 = strlen(": ") + strlen("\r\n")
|
|
|
- // Initialize tp_str with "cwtrace: "
|
|
|
- __builtin_memcpy(storage->tp_str, "cwtrace: ", CW_HEADER_KEY_LENGTH + 2);
|
|
|
+ // Initialize tp_str with "apmtrace: "
|
|
|
+ __builtin_memcpy(storage->tp_str, "apmtrace: ", CW_HEADER_KEY_LENGTH + 2);
|
|
|
__builtin_memcpy(&storage->tp_str[CW_HEADER_KEY_LENGTH + 2], storage->tp, sizeof(storage->tp));
|
|
|
__builtin_memcpy(storage->end, "\r\n", 2);
|
|
|
__builtin_memcpy(&storage->tp_str[CW_HEADER_KEY_LENGTH + 2 + CW_HEADER_VAL_LENGTH], storage->end, sizeof(storage->end));
|
|
|
@@ -646,7 +646,7 @@ int uprobe_writeSubset(struct pt_regs *ctx) {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- // 插入 cwother header
|
|
|
+ // 插入 apmother header
|
|
|
// 直接从 proc_info->sysvc 获取值
|
|
|
u32 sys_map_id = 0;
|
|
|
struct cw_sys_header_storage *sys_storage = bpf_map_lookup_elem(&cw_sys_header_storage_map, &sys_map_id);
|
|
|
@@ -671,20 +671,20 @@ int uprobe_writeSubset(struct pt_regs *ctx) {
|
|
|
}
|
|
|
|
|
|
// 检查缓冲区空间
|
|
|
- u32 total_header_len = CW_SYS_HEADER_KEY_LENGTH + 2 + sys_val_len + 2; // "cwother: " + sys_val + "\r\n"
|
|
|
+ u32 total_header_len = CW_SYS_HEADER_KEY_LENGTH + 2 + sys_val_len + 2; // "apmother: " + sys_val + "\r\n"
|
|
|
if (len + total_header_len <= size) {
|
|
|
- // Initialize sys_str with "cwother: "
|
|
|
- __builtin_memcpy(sys_storage->sys_str, "cwother: ", CW_SYS_HEADER_KEY_LENGTH + 2);
|
|
|
+ // Initialize sys_str with "apmother: "
|
|
|
+ __builtin_memcpy(sys_storage->sys_str, "apmother: ", CW_SYS_HEADER_KEY_LENGTH + 2);
|
|
|
__builtin_memcpy(&sys_storage->sys_str[CW_SYS_HEADER_KEY_LENGTH + 2], sys_storage->sys_val, CW_SYS_HEADER_VAL_LENGTH);
|
|
|
__builtin_memcpy(&sys_storage->sys_str[CW_SYS_HEADER_KEY_LENGTH + 2 + sys_val_len], "\r\n", 2);
|
|
|
|
|
|
if (bpf_probe_write_user(buf_ptr + (len & 0x0ffff), sys_storage->sys_str, total_header_len)) {
|
|
|
- cw_bpf_debug("uprobe_writeSubset: Failed to write cwother header in buffer");
|
|
|
+ cw_bpf_debug("uprobe_writeSubset: Failed to write apmother header in buffer");
|
|
|
goto done;
|
|
|
}
|
|
|
len += total_header_len;
|
|
|
if (bpf_probe_write_user((void *) (io_writer_ptr + proc_info->io_writer_n_pos), &len, sizeof(len))) {
|
|
|
- cw_bpf_debug("uprobe_writeSubset: Failed to change io writer n for cwother");
|
|
|
+ cw_bpf_debug("uprobe_writeSubset: Failed to change io writer n for apmother");
|
|
|
goto done;
|
|
|
}
|
|
|
}
|