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:   Mon, 2 Mar 2020 18:50:37 -0800
From:   Alexei Starovoitov <alexei.starovoitov@...il.com>
To:     Andrii Nakryiko <andriin@...com>
Cc:     bpf@...r.kernel.org, netdev@...r.kernel.org, ast@...com,
        daniel@...earbox.net, andrii.nakryiko@...il.com, kernel-team@...com
Subject: Re: [PATCH bpf-next 1/3] bpf: introduce pinnable bpf_link abstraction

On Fri, Feb 28, 2020 at 02:39:46PM -0800, Andrii Nakryiko wrote:
>  
> +int bpf_link_new_fd(struct bpf_link *link)
> +{
> +	return anon_inode_getfd("bpf-link", &bpf_link_fops, link, O_CLOEXEC);
> +}
...
> -	tr_fd = anon_inode_getfd("bpf-tracing-prog", &bpf_tracing_prog_fops,
> -				 prog, O_CLOEXEC);
> +	tr_fd = anon_inode_getfd("bpf-tracing-link", &bpf_link_fops,
> +				 &link->link, O_CLOEXEC);
...
> -	tp_fd = anon_inode_getfd("bpf-raw-tracepoint", &bpf_raw_tp_fops, raw_tp,
> -				 O_CLOEXEC);
> +	tp_fd = anon_inode_getfd("bpf-raw-tp-link", &bpf_link_fops,
> +				 &raw_tp->link, O_CLOEXEC);

I don't think different names are strong enough reason to open code it.
I think bpf_link_new_fd() should be used in all cases.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ