Skip to content

Is it possible to modify a syscall's arguments using bpftrace #2280

Answered by viktormalik
Taeyang123456 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @Taeyang123456, I think that this is not possible with eBPF.

What is possible is to override the syscall's return value, in bpftrace this is done using the override builtin. This only works if your kernel is compiled with CONFIG_BPF_KPROBE_OVERRIDE and the function you override must be tagged with ALLOW_ERROR_INJECTION (which, AFAIK, all syscalls are).

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@Taeyang123456
Comment options

@viktormalik
Comment options

@Taeyang123456
Comment options

@viktormalik
Comment options

@Taeyang123456
Comment options

Answer selected by Taeyang123456
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants