Skip to content

Commit

Permalink
link: document why TestKprobeOffset fails on arm64
Browse files Browse the repository at this point in the history
  • Loading branch information
lmb committed Jul 26, 2022
1 parent 2fb31df commit cd71052
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions link/kprobe_amd64_test.go
Expand Up @@ -14,6 +14,9 @@ import (
func TestKprobeOffset(t *testing.T) {
prog := mustLoadProgram(t, ebpf.Kprobe, 0, "")

// This test only works on amd64 because arches like arm64 don't allow
// probes on unaligned addresses and return EINVAL instead of EILSEQ,
// see arch_prepare_kprobe().
for i := uint64(2); i < 10; i++ {
k, err := Kprobe("inet6_release", prog, &KprobeOptions{Offset: i})
if err != nil {
Expand Down

0 comments on commit cd71052

Please sign in to comment.