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 4
4
package ticker
5
5
6
6
import (
7
+ "os"
7
8
"strings"
8
9
"time"
9
10
@@ -99,6 +100,11 @@ func (ticker *ebpfTicker) Stop() {
99
100
100
101
func buildEbpfProg (events * ebpf.Map ) (* ebpf.Program , error ) {
101
102
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
+
102
108
// ringbuf = &map
103
109
asm .LoadMapPtr (asm .R1 , events .FD ()),
104
110
@@ -120,7 +126,7 @@ func buildEbpfProg(events *ebpf.Map) (*ebpf.Program, error) {
120
126
asm .FnRingbufOutput .Call (),
121
127
122
128
// return 0
123
- asm .Mov .Imm (asm .R0 , 0 ),
129
+ asm .Mov .Imm (asm .R0 , 0 ). WithSymbol ( "ret" ) ,
124
130
asm .Return (),
125
131
}
126
132
You can’t perform that action at this time.
0 commit comments