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: <f382be0d-6f30-443e-b161-d1d172dcd801@blackwall.org>
Date: Wed, 9 Jul 2025 10:37:51 +0300
From: Nikolay Aleksandrov <razor@...ckwall.org>
To: Tao Chen <chen.dylane@...ux.dev>, daniel@...earbox.net,
 andrew+netdev@...n.ch, davem@...emloft.net, edumazet@...gle.com,
 kuba@...nel.org, pabeni@...hat.com, ast@...nel.org, andrii@...nel.org,
 martin.lau@...ux.dev, eddyz87@...il.com, song@...nel.org,
 yonghong.song@...ux.dev, john.fastabend@...il.com, kpsingh@...nel.org,
 sdf@...ichev.me, haoluo@...gle.com, jolsa@...nel.org,
 mattbobrowski@...gle.com, rostedt@...dmis.org, mhiramat@...nel.org,
 mathieu.desnoyers@...icios.com, horms@...nel.org, willemb@...gle.com,
 jakub@...udflare.com, pablo@...filter.org, kadlec@...filter.org,
 hawk@...nel.org
Cc: bpf@...r.kernel.org, netdev@...r.kernel.org,
 linux-kernel@...r.kernel.org, linux-trace-kernel@...r.kernel.org,
 netfilter-devel@...r.kernel.org, coreteam@...filter.org
Subject: Re: [PATCH bpf-next v3 7/7] netkit: Remove location field in
 netkit_link

On 7/9/25 06:08, Tao Chen wrote:
> Use attach_type in bpf_link to replace the location field, and
> remove location field in netkit_link.
> 
> Acked-by: Jiri Olsa <jolsa@...nel.org>
> Signed-off-by: Tao Chen <chen.dylane@...ux.dev>
> ---
>  drivers/net/netkit.c | 8 +++-----
>  1 file changed, 3 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/net/netkit.c b/drivers/net/netkit.c
> index 5928c99eac7..492be60f2e7 100644
> --- a/drivers/net/netkit.c
> +++ b/drivers/net/netkit.c
> @@ -32,7 +32,6 @@ struct netkit {
>  struct netkit_link {
>  	struct bpf_link link;
>  	struct net_device *dev;
> -	u32 location;
>  };
>  
>  static __always_inline int
> @@ -733,8 +732,8 @@ static void netkit_link_fdinfo(const struct bpf_link *link, struct seq_file *seq
>  
>  	seq_printf(seq, "ifindex:\t%u\n", ifindex);
>  	seq_printf(seq, "attach_type:\t%u (%s)\n",
> -		   nkl->location,
> -		   nkl->location == BPF_NETKIT_PRIMARY ? "primary" : "peer");
> +		   link->attach_type,
> +		   link->attach_type == BPF_NETKIT_PRIMARY ? "primary" : "peer");
>  }
>  
>  static int netkit_link_fill_info(const struct bpf_link *link,
> @@ -749,7 +748,7 @@ static int netkit_link_fill_info(const struct bpf_link *link,
>  	rtnl_unlock();
>  
>  	info->netkit.ifindex = ifindex;
> -	info->netkit.attach_type = nkl->location;
> +	info->netkit.attach_type = link->attach_type;
>  	return 0;
>  }
>  
> @@ -776,7 +775,6 @@ static int netkit_link_init(struct netkit_link *nkl,
>  {
>  	bpf_link_init(&nkl->link, BPF_LINK_TYPE_NETKIT,
>  		      &netkit_link_lops, prog, attr->link_create.attach_type);
> -	nkl->location = attr->link_create.attach_type;
>  	nkl->dev = dev;
>  	return bpf_link_prime(&nkl->link, link_primer);
>  }

LGTM for netkit,
Acked-by: Nikolay Aleksandrov <razor@...ckwall.org>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ