Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
mzz2017 committed Sep 24, 2024
1 parent 23ff99c commit 736fe81
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions control/kern/tproxy.c
Original file line number Diff line number Diff line change
Expand Up @@ -1742,7 +1742,7 @@ static __always_inline int get_pid_pname(struct pid_pname *pid_pname)
char *args = (void *)BPF_CORE_READ(task, mm, arg_start);

// Read args to buffer.
char arg_buf[MAX_ARG_LEN]; // Allocate it out of ctx to bypass CO-RE
char arg_buf[MAX_ARG_LEN]; // Allocate it out of ctx to pass CO-RE
struct get_real_comm_ctx ctx = { 0 };
ctx.arg_buf = arg_buf;
ret = bpf_core_read_user_str(arg_buf, MAX_ARG_LEN, args);
Expand All @@ -1758,7 +1758,7 @@ static __always_inline int get_pid_pname(struct pid_pname *pid_pname)
if (unlikely(ret < 0))
return ret;

unsigned offset = ctx.l; // Copy it to bypass CO-RE
unsigned offset = ctx.l; // Copy it to pass CO-RE
ret = bpf_core_read_str(pid_pname->pname, sizeof(pid_pname->pname),
arg_buf + offset);
if (unlikely(ret < 0)) {
Expand Down

0 comments on commit 736fe81

Please sign in to comment.