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]
Message-ID: <ywlrfaa7rbutt4j35ku5zmsgtpvjx5ztmiqyqt5amty4wt63j7@mr3thty7gz7p>
Date: Sat, 18 Jan 2025 23:32:07 +0800
From: Jiayuan Chen <mrpre@....com>
To: Jakub Sitnicki <jakub@...udflare.com>
Cc: bpf@...r.kernel.org, john.fastabend@...il.com, netdev@...r.kernel.org, 
	martin.lau@...ux.dev, ast@...nel.org, edumazet@...gle.com, davem@...emloft.net, 
	dsahern@...nel.org, kuba@...nel.org, pabeni@...hat.com, linux-kernel@...r.kernel.org, 
	song@...nel.org, andrii@...nel.org, mhal@...x.co, yonghong.song@...ux.dev, 
	daniel@...earbox.net, xiyou.wangcong@...il.com, horms@...nel.org, corbet@....net, 
	eddyz87@...il.com, cong.wang@...edance.com, shuah@...nel.org, mykolal@...com, 
	jolsa@...nel.org, haoluo@...gle.com, sdf@...ichev.me, kpsingh@...nel.org, 
	linux-doc@...r.kernel.org
Subject: Re: [PATCH bpf v7 3/5] bpf: disable non stream socket for strparser

On Sat, Jan 18, 2025 at 04:03:33PM +0100, Jakub Sitnicki wrote:
> On Thu, Jan 16, 2025 at 10:05 PM +08, Jiayuan Chen wrote:
> > +	if (sk_is_tcp(sk))
> > +		return true;
> > +	return false;
> > +}
> > +
> 
> We don't need this yet, so please don't add it. Especially since this is
> fix. It should be kept down to a minimum. Do the sk_is_tcp() check
> directly from sock_map_link().
> 
Ok, I will do this.
> >  static int sock_map_link(struct bpf_map *map, struct sock *sk)
> >  {
> >  	struct sk_psock_progs *progs = sock_map_progs(map);
> > @@ -303,7 +311,10 @@ static int sock_map_link(struct bpf_map *map, struct sock *sk)
> >  
> >  	write_lock_bh(&sk->sk_callback_lock);
> >  	if (stream_parser && stream_verdict && !psock->saved_data_ready) {
> > -		ret = sk_psock_init_strp(sk, psock);
> > +		if (sock_map_sk_strp_allowed(sk))
> > +			ret = sk_psock_init_strp(sk, psock);
> > +		else
> > +			ret = -EOPNOTSUPP;
> >  		if (ret) {
> >  			write_unlock_bh(&sk->sk_callback_lock);
> >  			sk_psock_put(sk, psock);


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ