Skip to content

Commit

Permalink
ch7
Browse files Browse the repository at this point in the history
Signed-off-by: Liz Rice <[email protected]>
  • Loading branch information
lizrice committed Jan 9, 2023
1 parent 33c269c commit 5ce0251
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions chapter7/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Examples not currently running on ARM processor

* fentry kprobe at do_execve() (fentry requires kernel version 6.0 on ARM)
4 changes: 2 additions & 2 deletions chapter7/hello.bpf.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ int BPF_KPROBE_SYSCALL(kprobe_sys_execve, char *pathname)
}

// TODO!! Work on ARM
// #ifndef __TARGET_ARCH_arm64
#ifndef __TARGET_ARCH_arm64
SEC("kprobe/do_execve")
int BPF_KPROBE(kprobe_do_execve, struct filename *filename) {
struct message_data data = {};
Expand All @@ -57,7 +57,7 @@ int BPF_KPROBE(kprobe_do_execve, struct filename *filename) {

return 0;
}
// #endif
#endif

// This should really look at the kernel version, because fentry is supported on
// ARM from Linux 6.0 onwards
Expand Down

0 comments on commit 5ce0251

Please sign in to comment.