diff options
author | Larysa Zaremba <[email protected]> | 2023-07-11 12:59:26 +0200 |
---|---|---|
committer | Alexei Starovoitov <[email protected]> | 2023-07-11 20:04:50 -0700 |
commit | 2e06c57d66d3f6c26faa5f5b479fb3add34ce85a (patch) | |
tree | d70babf18e228ab93441c2fccbb916e6caf85e17 /tools/perf/scripts/python/export-to-sqlite.py | |
parent | 4369016497319a9635702da010d02af1ebb1849d (diff) |
xdp: use trusted arguments in XDP hints kfuncs
Currently, verifier does not reject XDP programs that pass NULL pointer to
hints functions. At the same time, this case is not handled in any driver
implementation (including veth). For example, changing
bpf_xdp_metadata_rx_timestamp(ctx, ×tamp);
to
bpf_xdp_metadata_rx_timestamp(ctx, NULL);
in xdp_metadata test successfully crashes the system.
Add KF_TRUSTED_ARGS flag to hints kfunc definitions, so driver code
does not have to worry about getting invalid pointers.
Fixes: 3d76a4d3d4e5 ("bpf: XDP metadata RX kfuncs")
Reported-by: Stanislav Fomichev <[email protected]>
Closes: https://lore.kernel.org/bpf/[email protected]/
Signed-off-by: Larysa Zaremba <[email protected]>
Acked-by: Jesper Dangaard Brouer <[email protected]>
Acked-by: Stanislav Fomichev <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Alexei Starovoitov <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions