File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 44package ticker
55
66import (
7+ "os"
78 "strings"
89 "time"
910
@@ -99,6 +100,11 @@ func (ticker *ebpfTicker) Stop() {
99100
100101func buildEbpfProg (events * ebpf.Map ) (* ebpf.Program , error ) {
101102 inst := asm.Instructions {
103+ // ignore events from the guestagent process itself
104+ asm .FnGetCurrentPidTgid .Call (),
105+ asm .RSh .Imm (asm .R0 , 32 ),
106+ asm .JEq .Imm (asm .R0 , int32 (os .Getpid ()), "ret" ),
107+
102108 // ringbuf = &map
103109 asm .LoadMapPtr (asm .R1 , events .FD ()),
104110
@@ -120,7 +126,7 @@ func buildEbpfProg(events *ebpf.Map) (*ebpf.Program, error) {
120126 asm .FnRingbufOutput .Call (),
121127
122128 // return 0
123- asm .Mov .Imm (asm .R0 , 0 ),
129+ asm .Mov .Imm (asm .R0 , 0 ). WithSymbol ( "ret" ) ,
124130 asm .Return (),
125131 }
126132
You can’t perform that action at this time.
0 commit comments