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] [day] [month] [year] [list]
Message-ID: <66f2d886-e3d4-4f8f-a735-b0ce1c412ee2@iogearbox.net>
Date: Thu, 23 Jan 2025 22:14:10 +0100
From: Daniel Borkmann <daniel@...earbox.net>
To: zhangmingyi <zhangmingyi5@...wei.com>, ast@...nel.org, andrii@...nel.org,
 martin.lau@...ux.dev, song@...nel.org, yhs@...com, john.fastabend@...il.com,
 kpsingh@...nel.org, sdf@...gle.com, haoluo@...gle.com, jolsa@...nel.org
Cc: bpf@...r.kernel.org, linux-kernel@...r.kernel.org, yanan@...wei.com,
 wuchangye@...wei.com, xiesongyang@...wei.com, liuxin350@...wei.com,
 liwei883@...wei.com, tianmuyang@...wei.com
Subject: Re: [PATCH] ipv4, bpf: Introduced to support the ULP to modify
 sockets during setopt

On 1/21/25 9:05 AM, zhangmingyi wrote:
> Note that tcp_getsockopt and tcp_setsockopt support TCP_ULP, while
> bpf_getsockopt and bpf_setsockopt do not support TCP_ULP.
> I think we can add the handling of this case.

Please elaborate on the use case you're trying to solve, and also a
BPF selftest is needed to back this use case up. Your latter sentence
does not sound overly sure which makes me wonder if you've tested this
code at all?

> Signed-off-by: zhangmingyi <zhangmingyi5@...wei.com>
> ---
>   net/core/filter.c | 4 ++++
>   1 file changed, 4 insertions(+)
> 
> diff --git a/net/core/filter.c b/net/core/filter.c
> index 713d6f454df3..f23d3f87e690 100644
> --- a/net/core/filter.c
> +++ b/net/core/filter.c
> @@ -5383,6 +5383,10 @@ static int sol_tcp_sockopt(struct sock *sk, int optname,
>   		if (*optlen < 1)
>   			return -EINVAL;
>   		break;
> +	case TCP_ULP:
> +		if (getopt)
> +			return -EINVAL;
> +		break;
>   	case TCP_BPF_SOCK_OPS_CB_FLAGS:
>   		if (*optlen != sizeof(int))
>   			return -EINVAL;


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ