diff options
| author | Paul Chaignon <paul@isovalent.com> | 2021-12-19 20:59:43 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2021-12-21 05:33:37 +0100 |
| commit | 249a240f56f88e69fe97cdcf8fb614ade2251958 (patch) | |
| tree | 295327a5cb0e9b2f9aad94ff37863b94aed81405 /executor/executor_bsd.h | |
| parent | b747e572ec589543e9ccb870158f467f7fa3d825 (diff) | |
sys/linux: support callback BPF functions
Commit [1] upstream introduced a new BPF helper, bpf_for_each_map_elem,
which comes with callback functions (BPF programs). The callback
function's address is provided via a 64-bit IMM load instruction where
the first 32-bit of the immediate value are the offset from the current
instruction to the start of the callback function. The 64-bit value is
then rewritten into the address of the callback function.
Callback BPF functions are similar to BPF_PSEUDO_CALL functions, except
the offset to the function is converted into an address to be passed to
a BPF helper. The same workaround is thus used to encode the offset in
syzkaller, given we can't currently limit the offset to the program
size.
1 - https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=69c087ba6225b
Signed-off-by: Paul Chaignon <paul@isovalent.com>
Diffstat (limited to 'executor/executor_bsd.h')
0 files changed, 0 insertions, 0 deletions
