Skip to main content

trusted_arguments

Function trusted_arguments 

Source
pub(crate) unsafe fn trusted_arguments(btf: *const btf) -> Vec<(i32, i32)>
Expand description

The parameters of the object’s global functions that are a pointer to a task_struct, as (function, parameter index).

The verifier checks a global function once, from its prototype alone, and takes a kernel pointer there only under an arg:trusted declaration tag, C’s __arg_trusted, which Rust cannot express. Every caller passes a task the kernel handed to a callback, so each such parameter gets the tag.