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:   Wed, 08 Aug 2018 12:14:30 -0700 (PDT)
From:   David Miller <davem@...emloft.net>
To:     doronrk@...com
Cc:     davejwatson@...com, vakul.garg@....com, borisp@...lanox.com,
        aviadye@...lanox.com, netdev@...r.kernel.org
Subject: Re: [PATCH net-next,v4] net/tls: Calculate nsg for zerocopy path
 without skb_cow_data.

From: Doron Roberts-Kedes <doronrk@...com>
Date: Tue, 7 Aug 2018 11:09:39 -0700

> +static int __skb_nsg(struct sk_buff *skb, int offset, int len,
> +		     unsigned int recursion_level)
> +{
> +	int start = skb_headlen(skb);
> +	int i, copy = start - offset;
> +	struct sk_buff *frag_iter;
> +	int elt = 0;
> +
> +	if (unlikely(recursion_level >= 24))
> +		return -EMSGSIZE;

This recursion is kinda crazy.

Even skb_cow_data() doesn't recurse like this (of course because it copies
into linear buffers).

There has to be a way to simplify this.  Fragment lists are such a rarely
used SKB geometry, and few if any devices support it for transmission
(so the fraglist will get undone at transmit time anyways).

> +	// We need one extra for ctx->rx_aad_ciphertext

Please do not use C++ style comments in code.

Thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ