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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <db7bc3ce-dea0-9abe-9b06-300c10c37759@arista.com>
Date:   Mon, 24 Jul 2023 17:06:30 +0100
From:   Dmitry Safonov <dima@...sta.com>
To:     Simon Horman <simon.horman@...igine.com>
Cc:     David Ahern <dsahern@...nel.org>,
        Eric Dumazet <edumazet@...gle.com>,
        Paolo Abeni <pabeni@...hat.com>,
        Jakub Kicinski <kuba@...nel.org>,
        "David S. Miller" <davem@...emloft.net>,
        linux-kernel@...r.kernel.org,
        Andy Lutomirski <luto@...capital.net>,
        Ard Biesheuvel <ardb@...nel.org>,
        Bob Gilligan <gilligan@...sta.com>,
        Dan Carpenter <error27@...il.com>,
        David Laight <David.Laight@...lab.com>,
        Dmitry Safonov <0x7f454c46@...il.com>,
        Donald Cassidy <dcassidy@...hat.com>,
        Eric Biggers <ebiggers@...nel.org>,
        "Eric W. Biederman" <ebiederm@...ssion.com>,
        Francesco Ruggeri <fruggeri05@...il.com>,
        "Gaillardetz, Dominik" <dgaillar@...na.com>,
        Herbert Xu <herbert@...dor.apana.org.au>,
        Hideaki YOSHIFUJI <yoshfuji@...ux-ipv6.org>,
        Ivan Delalande <colona@...sta.com>,
        Leonard Crestez <cdleonard@...il.com>,
        Salam Noureddine <noureddine@...sta.com>,
        "Tetreault, Francois" <ftetreau@...na.com>, netdev@...r.kernel.org,
        Steen Hegelund <Steen.Hegelund@...rochip.com>
Subject: Re: [PATCH v8.1 net-next 01/23] net/tcp: Prepare tcp_md5sig_pool for
 TCP-AO

Hi Simon,

On 7/24/23 14:11, Simon Horman wrote:
> On Fri, Jul 21, 2023 at 05:18:52PM +0100, Dmitry Safonov wrote:
> 
> Hi Dmitry,
> 
> some minor nits from my side.
> 
> ...
> 
>> +/**
>> + * tcp_sigpool_start - disable bh and start using tcp_sigpool_ahash
>> + * @id: tcp_sigpool that was previously allocated by tcp_sigpool_alloc_ahash()
>> + * @c: returned tcp_sigpool for usage (uninitialized on failure)
>> + */
>> +int tcp_sigpool_start(unsigned int id, struct tcp_sigpool *c);
>> +/**
>> + * tcp_sigpool_end - enable bh and stop using tcp_sigpool
> 
> nit: as this is a kernel doc, please document @c here.

Thanks, yeah, I also noticed that on netdev/kdoc and there are some
other nits on the patchwork that Intel's build bot didn't report to my
surprise. Will address them in v9.

>> + */
>> +void tcp_sigpool_end(struct tcp_sigpool *c);
>> +size_t tcp_sigpool_algo(unsigned int id, char *buf, size_t buf_len);
>>  /* - functions */
>>  int tcp_v4_md5_hash_skb(char *md5_hash, const struct tcp_md5sig_key *key,
>>  			const struct sock *sk, const struct sk_buff *skb);
> 
> ...
> 
>> @@ -1439,8 +1443,7 @@ int tcp_v4_md5_hash_skb(char *md5_hash, const struct tcp_md5sig_key *key,
>>  			const struct sock *sk,
>>  			const struct sk_buff *skb)
>>  {
>> -	struct tcp_md5sig_pool *hp;
>> -	struct ahash_request *req;
>> +	struct tcp_sigpool hp;
>>  	const struct tcphdr *th = tcp_hdr(skb);
>>  	__be32 saddr, daddr;
> 
> nit: please consider using reverse xmas tree - longest line to shortest -
>      for these local variable declarations.
> 
> 	const struct tcphdr *th = tcp_hdr(skb);
> 	struct tcp_sigpool hp;
> 	__be32 saddr, daddr;
> 
> Likewise, elsewhere, when it can be done without excess churn.

Yeah, fail enough, I usually keep it Xmas-like, but sometimes they slip
in unnoticed. I'll take a look over the patches.

Thanks,
            Dmitry

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ