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: <20190124192735.76aaa463@maciek-lenovo>
Date:   Thu, 24 Jan 2019 19:27:35 +0100
From:   Maciej FijaƂkowski 
        <maciejromanfijalkowski@...il.com>
To:     Jesper Dangaard Brouer <brouer@...hat.com>,
        Daniel Borkmann <daniel@...earbox.net>
Cc:     ast@...nel.org, netdev@...r.kernel.org,
        jakub.kicinski@...ronome.com
Subject: Re: [PATCH bpf-next v2 2/8] libbpf: Add a helper for retrieving a
 prog via index

On Thu, 24 Jan 2019 13:09:49 +0100
Jesper Dangaard Brouer <brouer@...hat.com> wrote:

> On Thu, 24 Jan 2019 12:56:36 +0100
> Daniel Borkmann <daniel@...earbox.net> wrote:
> 
> > > Please feel free to deprecate or remove the xdp_redirect_cpu --prognum
> > > option.  I would prefer if this was indeed converted to selecting the
> > > program based on the name in the _kern.c file, instead of a number.  
> > 
> > Given this is BPF sample code, there is no need to deprecate, lets just
> > remove --prognum option and add a new one for selection by name.
> 
> I agree, just remove  --prognum option.
> 
Actually we can convert it to --progname and use it for providing the section
name of program to be loaded.

On Wed, 23 Jan 2019 15:11:09 +0100
Daniel Borkmann <daniel@...earbox.net> wrote:

> > can live with this. In case of typo and program being not found it would be
> > good to print out the section names to choose from in usage().
> 
> Agree, might be nice as well via libbpf.

Would it be acceptable to print them from within libbpf? Something as trivial
as:
void
bpf_object__print_type_sections(struct bpf_object *obj,
				enum bpf_prog_type type)
{
	struct bpf_program *prog;

	bpf_object__for_each_program(prog, obj) {
		if (bpf_program__is_type(prog, type))
			pr_info("section %s\n", prog->section_name);
	}
}
Or do we want to add a accessor for section_name and go through programs in
application?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ