lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAEf4BzZuZu+tnCEE1vmBggJHxO+mF3gTYA0s2+1=SVc_YwZ7=w@mail.gmail.com>
Date: Fri, 10 Jan 2025 14:40:21 -0800
From: Andrii Nakryiko <andrii.nakryiko@...il.com>
To: Daniel Xu <dxu@...uu.xyz>
Cc: eddyz87@...il.com, andrii@...nel.org, daniel@...earbox.net, 
	shuah@...nel.org, ast@...nel.org, mykolal@...com, martin.lau@...ux.dev, 
	song@...nel.org, yonghong.song@...ux.dev, john.fastabend@...il.com, 
	kpsingh@...nel.org, sdf@...ichev.me, haoluo@...gle.com, jolsa@...nel.org, 
	bpf@...r.kernel.org, linux-kselftest@...r.kernel.org, 
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH bpf-next] bpf: veristat: Document verifier log dumping capability

On Thu, Jan 9, 2025 at 3:42 PM Daniel Xu <dxu@...uu.xyz> wrote:
>
> `-l2 -v` is a useful combination of flags to dump the entire
> verification log. This is helpful when making changes to the verifier,
> as you can see what it thinks program one instruction at a time.
>
> This was more or less a hidden feature before. Document it so others can
> discover it.
>
> Signed-off-by: Daniel Xu <dxu@...uu.xyz>
> ---
>  tools/testing/selftests/bpf/veristat.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/tools/testing/selftests/bpf/veristat.c b/tools/testing/selftests/bpf/veristat.c
> index 974c808f9321..7d0a9cb753e3 100644
> --- a/tools/testing/selftests/bpf/veristat.c
> +++ b/tools/testing/selftests/bpf/veristat.c
> @@ -216,7 +216,8 @@ const char argp_program_doc[] =
>  "\n"
>  "USAGE: veristat <obj-file> [<obj-file>...]\n"
>  "   OR: veristat -C <baseline.csv> <comparison.csv>\n"
> -"   OR: veristat -R <results.csv>\n";
> +"   OR: veristat -R <results.csv>\n"
> +"   OR: veristat -v -l2 <to_analyze.bpf.o>\n";

let's be cute, '-vl2'? :) I adjusted while applying, but yell if you disagree

>
>  enum {
>         OPT_LOG_FIXED = 1000,
> @@ -228,7 +229,7 @@ static const struct argp_option opts[] = {
>         { "version", 'V', NULL, 0, "Print version" },
>         { "verbose", 'v', NULL, 0, "Verbose mode" },
>         { "debug", 'd', NULL, 0, "Debug mode (turns on libbpf debug logging)" },
> -       { "log-level", 'l', "LEVEL", 0, "Verifier log level (default 0 for normal mode, 1 for verbose mode)" },
> +       { "log-level", 'l', "LEVEL", 0, "Verifier log level (default 0 for normal mode, 1 for verbose mode, 2 for full verification log)" },
>         { "log-fixed", OPT_LOG_FIXED, NULL, 0, "Disable verifier log rotation" },
>         { "log-size", OPT_LOG_SIZE, "BYTES", 0, "Customize verifier log size (default to 16MB)" },
>         { "top-n", 'n', "N", 0, "Emit only up to first N results." },
> --
> 2.47.1
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ