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: <65411680-edf9-4670-be49-b73cc845c1cf@auristor.com>
Date:   Fri, 10 Nov 2023 11:12:13 -0500
From:   Jeffrey E Altman <jaltman@...istor.com>
To:     David Howells <dhowells@...hat.com>
Cc:     Marc Dionne <marc.dionne@...istor.com>,
        linux-afs@...ts.infradead.org, linux-fsdevel@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 01/41] rxrpc: Fix RTT determination to use PING ACKs as a
 source

On 11/10/2023 9:15 AM, Jeffrey E Altman wrote:
>
>> I'm not sure how expanding it internally to 64-bits actually helps 
>> since the
>> upper 32 bits is not visible to the peer.
> rxrpc_complete_rtt_probe contains the following logic that relies on 
> after() being able to detect
> a serial number wrap.
>
>         /* If a later serial is being acked, then mark this slot as
>          * being available.
>          */
>
>         if (after(acked_serial, orig_serial)) {
>             trace_rxrpc_rtt_rx(call, rxrpc_rtt_rx_obsolete, i,
>                        orig_serial, acked_serial, 0, 0);
>             clear_bit(i + RXRPC_CALL_RTT_PEND_SHIFT, &call->rtt_avail);
>             smp_wmb();
>             set_bit(i, &call->rtt_avail);
>         }
>
> Otherwise, acked_serial = 0x01 will be considered smaller than 
> orig_serial = 0xfffffffe and the slot will not be marked available.
>
> I will note that there is a similar problem with rxrpc_seq_t values 
> which are u32 on the wire but which will wrap for calls that transmit 
> more than approximately 5.5TB of data. Calls of this size are unlikely 
> for a cache manager but are common for any service transmitting volume 
> dumps. 

I misread the definition of after() which is

     static inline bool after(u32 seq1, u32 seq2)
     {
             return (s32)(seq1 - seq2) > 0;
     }

This is sufficient to detect the serial number and sequence number wrapping.

What it doesn't provide is a method for rxrpc tracing and /proc file to 
report on the total number of packets that have been sent or received on 
a call or connection which might or might not be important depending 
upon the use case.

Jeffrey Altman


Download attachment "smime.p7s" of type "application/pkcs7-signature" (4039 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ