Skip to content

Commit

Permalink
Merge pull request #276 from netoptimizer/reading03
Browse files Browse the repository at this point in the history
Minor adjustsments
  • Loading branch information
bobrik authored Dec 27, 2023
2 parents ad32af4 + 5246b36 commit 4145b41
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions benchmark/probes/benchmark.bpf.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
#include <bpf/bpf_tracing.h>

#if defined(__TARGET_ARCH_x86)
#define FENTRY_SEC() SEC("fentry/__x64_sys_getpid")
#define FENTRY_SEC() SEC("fentry/__do_sys_getpid")
#elif defined(__TARGET_ARCH_arm64)
#define FENTRY_SEC() SEC("fentry/__arm64_sys_getpid")
#else
#error Unknown target for this architecture
#endif

#if defined(__TARGET_ARCH_x86)
#define KPROBE_SEC() SEC("kprobe/__x64_sys_getpid")
#define KPROBE_SEC() SEC("kprobe/__do_sys_getpid")
#elif defined(__TARGET_ARCH_arm64)
#define KPROBE_SEC() SEC("kprobe/__arm64_sys_getpid")
#else
Expand Down
2 changes: 1 addition & 1 deletion cgroup/fanotify.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ func (m *fanotifyMonitor) Resolve(id int) string {
}

// The following kernel patch is required to take advantage of this (included in v6.6-rc1):
// * https://github.com/torvalds/linux/commit/0ce7c12e88cf
// * https://git.kernel.org/torvalds/c/0ce7c12e88cf ("kernfs: attach uuid for every kernfs and report it in fsid")
func attachFanotify(path string) (io.Reader, error) {
fd, err := unix.FanotifyInit(unix.FAN_CLASS_NOTIF|unix.FAN_REPORT_DFID_NAME, uint(0))
if err != nil {
Expand Down

0 comments on commit 4145b41

Please sign in to comment.