1. 29 Sep, 2022 14 commits
  2. 28 Sep, 2022 6 commits
  3. 27 Sep, 2022 13 commits
  4. 26 Sep, 2022 3 commits
  5. 24 Sep, 2022 4 commits
    • Alexei Starovoitov's avatar
      Merge branch 'veristat: further usability improvements' · 230bf137
      Alexei Starovoitov authored
      Andrii Nakryiko says:
      
      ====================
      
      A small patch set adding few usability improvements and features making
      veristat a more convenient tool to be used for work on BPF verifier:
      
        - patch #2 speeds up and makes stats parsing from BPF verifier log more
          robust;
      
        - patch #3 makes veristat less strict about input object files; veristat
          will ignore non-BPF ELF files;
      
        - patch #4 adds progress log, by default, so that user doing
          mass-verification is aware that veristat is not stuck;
      
        - patch #5 allows to tune requested BPF verifier log level, which makes
          veristat a simplest way to get BPF verifier log, especially successfully
          verified ones.
      
      v1->v2:
        - don't emit progress in non-table mode, as it breaks CSV output.
      ====================
      Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
      230bf137
    • Andrii Nakryiko's avatar
      selftests/bpf: allow to adjust BPF verifier log level in veristat · e310efc5
      Andrii Nakryiko authored
      Add -l (--log-level) flag to override default BPF verifier log lever.
      This only matters in verbose mode, which is the mode in which veristat
      emits verifier log for each processed BPF program.
      
      This is important because for successfully verified BPF programs
      log_level 1 is empty, as BPF verifier truncates all the successfully
      verified paths. So -l2 is the only way to actually get BPF verifier log
      in practice. It looks sometihng like this:
      
        [vmuser@archvm bpf]$ sudo ./veristat xdp_tx.bpf.o -vl2
        Processing 'xdp_tx.bpf.o'...
        PROCESSING xdp_tx.bpf.o/xdp_tx, DURATION US: 19, VERDICT: success, VERIFIER LOG:
        func#0 @0
        0: R1=ctx(off=0,imm=0) R10=fp0
        ; return XDP_TX;
        0: (b4) w0 = 3                        ; R0_w=3
        1: (95) exit
        verification time 19 usec
        stack depth 0
        processed 2 insns (limit 1000000) max_states_per_insn 0 total_states 0 peak_states 0 mark_read 0
      
        File          Program  Verdict  Duration (us)  Total insns  Total states  Peak states
        ------------  -------  -------  -------------  -----------  ------------  -----------
        xdp_tx.bpf.o  xdp_tx   success             19            2             0            0
        ------------  -------  -------  -------------  -----------  ------------  -----------
        Done. Processed 1 files, 0 programs. Skipped 1 files, 0 programs.
      Signed-off-by: default avatarAndrii Nakryiko <andrii@kernel.org>
      Link: https://lore.kernel.org/r/20220923175913.3272430-6-andrii@kernel.orgSigned-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
      e310efc5
    • Andrii Nakryiko's avatar
      selftests/bpf: emit processing progress and add quiet mode to veristat · c511d009
      Andrii Nakryiko authored
      Emit "Processing <filepath>..." for each BPF object file to be
      processed, to show progress. But also add -q (--quiet) flag to silence
      such messages. Doing something more clever (like overwriting same output
      line) is to cumbersome and easily breakable if there is any other
      console output (e.g., errors from libbpf).
      Signed-off-by: default avatarAndrii Nakryiko <andrii@kernel.org>
      Link: https://lore.kernel.org/r/20220923175913.3272430-5-andrii@kernel.orgSigned-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
      c511d009
    • Andrii Nakryiko's avatar
      selftests/bpf: make veristat skip non-BPF and failing-to-open BPF objects · 518fee8b
      Andrii Nakryiko authored
      Make veristat ignore non-BPF object files. This allows simpler
      mass-verification (e.g., `sudo ./veristat *.bpf.o` in selftests/bpf
      directory). Note that `sudo ./veristat *.o` would also work, but with
      selftests's multiple copies of BPF object files (.bpf.o and
      .bpf.linked{1,2,3}.o) it's 4x slower.
      
      Also, given some of BPF object files could be incomplete in the sense
      that they are meant to be statically linked into final BPF object file
      (like linked_maps, linked_funcs, linked_vars), note such instances in
      stderr, but proceed anyways. This seems like a better trade off between
      completely silently ignoring BPF object file and aborting
      mass-verification altogether.
      Signed-off-by: default avatarAndrii Nakryiko <andrii@kernel.org>
      Link: https://lore.kernel.org/r/20220923175913.3272430-4-andrii@kernel.orgSigned-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
      518fee8b