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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 18 Oct 2023 08:35:30 -0600
From: David Ahern <dsahern@...nel.org>
To: Shung-Hsi Yu <shung-hsi.yu@...e.com>, netdev@...r.kernel.org
Cc: Stephen Hemminger <stephen@...workplumber.org>,
 Toke Høiland-Jørgensen <toke@...hat.com>
Subject: Re: [PATCH iproute2-next 2/2] bpf: increase verifier verbosity when
 in verbose mode

On 10/18/23 12:22 AM, Shung-Hsi Yu wrote:
> diff --git a/lib/bpf_libbpf.c b/lib/bpf_libbpf.c
> index f678a710..08692d30 100644
> --- a/lib/bpf_libbpf.c
> +++ b/lib/bpf_libbpf.c
> @@ -285,11 +285,14 @@ static int load_bpf_object(struct bpf_cfg_in *cfg)
>  	DECLARE_LIBBPF_OPTS(bpf_object_open_opts, open_opts,
>  			.relaxed_maps = true,
>  			.pin_root_path = root_path,
> -#ifdef (LIBBPF_MAJOR_VERSION > 0) || (LIBBPF_MINOR_VERSION >= 7)
> -			.kernel_log_level = 1,
> -#endif
>  	);
>  
> +#if (LIBBPF_MAJOR_VERSION > 0) || (LIBBPF_MINOR_VERSION >= 7)
> +	open_opts.kernel_log_level = 1;
> +	if (cfg->verbose)
> +		open_opts.kernel_log_level |= 2;
> +#endif
> +
>  	obj = bpf_object__open_file(cfg->object, &open_opts);
>  	if (libbpf_get_error(obj)) {
>  		fprintf(stderr, "ERROR: opening BPF object file failed\n");

Why have the first patch if you redo the code here?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ