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: Thu, 14 Dec 2023 17:17:10 +0100
From: Eric Dumazet <edumazet@...gle.com>
To: Kuniyuki Iwashima <kuniyu@...zon.com>
Cc: Alexei Starovoitov <ast@...nel.org>, Daniel Borkmann <daniel@...earbox.net>, 
	Andrii Nakryiko <andrii@...nel.org>, Martin KaFai Lau <martin.lau@...ux.dev>, 
	Kuniyuki Iwashima <kuni1840@...il.com>, bpf@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [PATCH v6 bpf-next 1/6] tcp: Move tcp_ns_to_ts() to tcp.h

On Thu, Dec 14, 2023 at 4:55 PM Kuniyuki Iwashima <kuniyu@...zon.com> wrote:
>
> We will support arbitrary SYN Cookie with BPF.
>
> When BPF prog validates ACK and kfunc allocates a reqsk, we need
> to call tcp_ns_to_ts() to calculate an offset of TSval for later
> use:
>
>   time
>   t0 : Send SYN+ACK
>        -> tsval = Initial TSval (Random Number)
>
>   t1 : Recv ACK of 3WHS
>        -> tsoff = TSecr - tcp_ns_to_ts(usec_ts_ok, tcp_clock_ns())
>                 = Initial TSval - t1
>
>   t2 : Send ACK
>        -> tsval = t2 + tsoff
>                 = Initial TSval + (t2 - t1)
>                 = Initial TSval + Time Delta (x)
>
>   (x) Note that the time delta does not include the initial RTT
>       from t0 to t1.
>
> Let's move tcp_ns_to_ts() to tcp.h.
>
> Signed-off-by: Kuniyuki Iwashima <kuniyu@...zon.com>

Reviewed-by: Eric Dumazet <edumazet@...gle.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ