• Quentin Monnet's avatar
    bpf: export function to write into verifier log buffer · 430e68d1
    Quentin Monnet authored
    Rename the BPF verifier `verbose()` to `bpf_verifier_log_write()` and
    export it, so that other components (in particular, drivers for BPF
    offload) can reuse the user buffer log to dump error messages at
    verification time.
    
    Renaming `verbose()` was necessary in order to avoid a name so generic
    to be exported to the global namespace. However to prevent too much pain
    for backports, the calls to `verbose()` in the kernel BPF verifier were
    not changed. Instead, use function aliasing to make `verbose` point to
    `bpf_verifier_log_write`. Another solution could consist in making a
    wrapper around `verbose()`, but since it is a variadic function, I don't
    see a clean way without creating two identical wrappers, one for the
    verifier and one to export.
    Signed-off-by: default avatarQuentin Monnet <quentin.monnet@netronome.com>
    Reviewed-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
    Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
    430e68d1
verifier.c 162 KB