Skip to content

Commit

Permalink
tetragon: Update list docs with syscall64 type
Browse files Browse the repository at this point in the history
And 32 bit syscalls.

Signed-off-by: Jiri Olsa <[email protected]>
  • Loading branch information
olsajiri authored and jrfastab committed Dec 13, 2023
1 parent 4268eb4 commit c9ae738
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 1 deletion.
42 changes: 42 additions & 0 deletions docs/content/en/docs/concepts/tracing-policy/hooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,24 @@ spec:
- "sys_close"
```

Syscalls specified with `sys_` prefix are translated to their 64 bit equivalent function names.

It's possible to specify 32 bit syscall by using its full function name that
includes specific architecture native prefix (like `__ia32_` for `x86`):

```yaml
spec:
lists:
- name: "dups"
type: "syscalls"
values:
- "sys_dup"
- "__ia32_sys_dup"
name: "another"
- "sys_open"
- "sys_close"
```

Specific list can be referenced in kprobe's `call` field with `"list:NAME"` value.

```yaml
Expand Down Expand Up @@ -520,3 +538,27 @@ spec:
values:
- "/usr/bin/kill"
```

Note that if syscall list is used in selector with InMap operator, the argument type needs to be `syscall64`, like.

```yaml
spec:
lists:
- name: "dups"
type: "syscalls"
values:
- "sys_dup"
- "__ia32_sys_dup"
tracepoints:
- subsystem: "raw_syscalls"
event: "sys_enter"
args:
- index: 4
type: "syscall64"
selectors:
- matchArgs:
- index: 0
operator: "InMap"
values:
- "list:dups"
```
2 changes: 1 addition & 1 deletion docs/content/en/docs/concepts/tracing-policy/selectors.md
Original file line number Diff line number Diff line change
Expand Up @@ -1047,7 +1047,7 @@ spec:
event: "sys_enter"
args:
- index: 4
type: "uint64"
type: "syscall64"
selectors:
- matchArgs:
- index: 0
Expand Down

0 comments on commit c9ae738

Please sign in to comment.