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: <20250719082147.GP2459@horms.kernel.org>
Date: Sat, 19 Jul 2025 09:21:47 +0100
From: Simon Horman <horms@...nel.org>
To: chia-yu.chang@...ia-bell-labs.com
Cc: pabeni@...hat.com, edumazet@...gle.com, linux-doc@...r.kernel.org,
	corbet@....net, dsahern@...nel.org, kuniyu@...zon.com,
	bpf@...r.kernel.org, netdev@...r.kernel.org, dave.taht@...il.com,
	jhs@...atatu.com, kuba@...nel.org, stephen@...workplumber.org,
	xiyou.wangcong@...il.com, jiri@...nulli.us, davem@...emloft.net,
	andrew+netdev@...n.ch, donald.hunter@...il.com, ast@...erby.net,
	liuhangbin@...il.com, shuah@...nel.org,
	linux-kselftest@...r.kernel.org, ij@...nel.org,
	ncardwell@...gle.com, koen.de_schepper@...ia-bell-labs.com,
	g.white@...lelabs.com, ingemar.s.johansson@...csson.com,
	mirja.kuehlewind@...csson.com, cheshire@...le.com, rs.ietf@....at,
	Jason_Livingood@...cast.com, vidhi_goel@...le.com
Subject: Re: [PATCH v13 net-next 11/14] tcp: accecn: AccECN option send
 control

On Fri, Jul 18, 2025 at 04:20:29PM +0200, chia-yu.chang@...ia-bell-labs.com wrote:

> @@ -549,4 +589,16 @@ tcp_ecn_make_synack(const struct request_sock *req, struct tcphdr *th)
>  		th->ece = 1;
>  }
>  
> +static inline bool tcp_accecn_option_beacon_check(const struct sock *sk)
> +{
> +	u32 ecn_beacon = READ_ONCE(sock_net(sk)->ipv4.sysctl_tcp_ecn_option_beacon);
> +	struct tcp_sock *tp = tcp_sk(sk);

Hi Chia-Yu Chang,

This is not a full review, but I have observed a minor problem with this
patch.

Commit e9d9da91548b ("tcp: preserve const qualifier in tcp_sk()")
updated tcp_sk so that, as it's subject says, the const qualifier
of it's argument is preserved.

But here sk is not const while tp is not.

I think the solution here is to make tp const.

	const struct tcp_sock *tp = tcp_sk(sk);

Flagged by GCC 15.1.0 and Clang 20.1.8 allmodconfig builds.

> +
> +	if (!ecn_beacon)
> +		return false;
> +
> +	return tcp_stamp_us_delta(tp->tcp_mstamp, tp->accecn_opt_tstamp) * ecn_beacon >=
> +	       (tp->srtt_us >> 3);
> +}
> +
>  #endif /* _LINUX_TCP_ECN_H */

-- 
pw-bot: changes-requested

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ