aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/mellanox
diff options
context:
space:
mode:
authorGravatar Kumar Kartikeya Dwivedi <memxor@gmail.com> 2023-09-13 01:32:05 +0200
committerGravatar Alexei Starovoitov <ast@kernel.org> 2023-09-16 09:34:21 -0700
commita923819fb2c5be029a69c0ca53239865c9bc05dd (patch)
treed4400ec8da0ad6f62693d291cf55759445515b59 /drivers/net/ethernet/mellanox
parentbpf: Perform CFG walk for exception callback (diff)
downloadlinux-a923819fb2c5.tar.gz
linux-a923819fb2c5.tar.bz2
linux-a923819fb2c5.zip
bpf: Treat first argument as return value for bpf_throw
In case of the default exception callback, change the behavior of bpf_throw, where the passed cookie value is no longer ignored, but is instead the return value of the default exception callback. As such, we need to place restrictions on the value being passed into bpf_throw in such a case, only allowing those permitted by the check_return_code function. Thus, bpf_throw can now control the return value of the program from each call site without having the user install a custom exception callback just to override the return value when an exception is thrown. We also modify the hidden subprog instructions to now move BPF_REG_1 to BPF_REG_0, so as to set the return value before exit in the default callback. Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com> Link: https://lore.kernel.org/r/20230912233214.1518551-9-memxor@gmail.com Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'drivers/net/ethernet/mellanox')
0 files changed, 0 insertions, 0 deletions