Fix the read data address

This commit is contained in:
M. Mert Yildiran 2022-05-31 15:12:37 +03:00
parent e9abe14ff5
commit 0e5571e156
No known key found for this signature in database
GPG Key ID: D42ADB236521BF7A
3 changed files with 2 additions and 2 deletions

View File

@ -79,8 +79,8 @@ static __always_inline int golang_crypto_tls_read_uprobe(struct pt_regs *ctx) {
b->conn_addr = ctx->rsi; // go.itab.*net.TCPConn,net.Conn address b->conn_addr = ctx->rsi; // go.itab.*net.TCPConn,net.Conn address
b->is_request = false; b->is_request = false;
// Address at ctx->rbx - 0x2bf holds the data // Address at ctx->rbx & 0xfffffff000 holds the data
__u32 status = bpf_probe_read_str(&b->data, sizeof(b->data), (void*)(ctx->rbx - 0x2bf)); __u32 status = bpf_probe_read_str(&b->data, sizeof(b->data), (void*)(ctx->rbx & 0xfffffff000));
if (status < 0) { if (status < 0) {
bpf_printk("[golang_crypto_tls_read_uprobe] error reading data: %d", status); bpf_printk("[golang_crypto_tls_read_uprobe] error reading data: %d", status);
bpf_ringbuf_discard(b, BPF_RB_FORCE_WAKEUP); bpf_ringbuf_discard(b, BPF_RB_FORCE_WAKEUP);

Binary file not shown.

Binary file not shown.