Skip to content

Commit

Permalink
Add TestLinuxBinprmExtractPath
Browse files Browse the repository at this point in the history
Signed-off-by: David Windsor <dawindso@cisco.com>
  • Loading branch information
dwindsor committed Jan 30, 2024
1 parent 66ccaed commit c62c8cc
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions bpf/process/types/basic.h
Original file line number Diff line number Diff line change
Expand Up @@ -2398,11 +2398,15 @@ read_call_arg(void *ctx, struct msg_generic_kprobe *e, int index, int type,
}
// fallthrough to file_ty
case linux_binprm_type: {
struct linux_binprm *bprm = (struct linux_binprm *)arg;
arg = (unsigned long)_(&bprm->file);
struct linux_binprm *bprm = (struct linux_binprm *)arg;
struct file *file;

arg = (unsigned long)_(&bprm->file);
probe_read(&file, sizeof(file), (const void *)arg);
arg = (unsigned long)file;

// fallthrough to file_ty
}
// fallthrough to file_ty
}
case file_ty: {
struct file *file;
probe_read(&file, sizeof(file), &arg);
Expand Down

0 comments on commit c62c8cc

Please sign in to comment.