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]
Date:   Thu, 12 Nov 2020 18:27:45 -0800
From:   Jakub Kicinski <kuba@...nel.org>
To:     Tariq Toukan <tariqt@...dia.com>
Cc:     "David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org,
        Saeed Mahameed <saeedm@...dia.com>,
        Moshe Shemesh <moshe@...dia.com>,
        Tariq Toukan <ttoukan.linux@...il.com>,
        Boris Pismenny <borisp@...dia.com>
Subject: Re: [PATCH net] net/tls: Fix wrong record sn in async mode of
 device resync

On Wed, 11 Nov 2020 14:55:56 +0200 Tariq Toukan wrote:
> +static inline bool tls_bigint_subtract(unsigned char *seq, int len, u16 n)

Please make n something more natural than u16. Helper should be
general, not just serving the current use case.


> +	if (WARN_ON_ONCE(len != 8))

You can do a BUILD_BUG_ON on TLS_MAX_REC_SEQ_SIZE instead, please.

> +		/* shouldn't get to wraparound, too long in async stage, something bad happened */

Umpf. Please wrap this comment.

In general for networking code prefer the 80 char wrapping.

Powered by blists - more mailing lists