• Brenden Blanco's avatar
    Add debug flag to enable prints from kernel verifier · 81a783a8
    Brenden Blanco authored
    Add flag to BPF() to enable debug prints from the verifier. Use by
    passing 0x2 to debug= in the constructor. Add docstring for BPF
    constructor.
    
    Also, optimize bpf_prog_load so that by default the kernel is not
    asked to print the verbose output. The program will be "loaded" a second
    time to capture the verifier failure message.
    
    Fixes: #147
    Signed-off-by: default avatarBrenden Blanco <bblanco@plumgrid.com>
    81a783a8
libbpf.c 6.72 KB