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, 8 Jun 2016 12:10:04 +0200
From:	Thomas Hellstrom <thellstrom@...are.com>
To:	Shrikrishna Khare <skhare@...are.com>, <netdev@...r.kernel.org>,
	<linux-kernel@...r.kernel.org>, <pv-drivers@...are.com>
CC:	Jin Heo <heoj@...are.com>
Subject: Re: [Pv-drivers] [PATCH net v2] vmxnet3: segCnt can be 1 for LRO
 packets

On 06/08/2016 08:13 AM, Shrikrishna Khare wrote:
> The device emulation may send segCnt of 1 for LRO packets.
>
> Signed-off-by: Shrikrishna Khare <skhare@...are.com>
> Signed-off-by: Jin Heo <heoj@...are.com>
>
> ---
> v2: fix subject line
> ---
>  drivers/net/vmxnet3/vmxnet3_drv.c | 2 +-
>  drivers/net/vmxnet3/vmxnet3_int.h | 4 ++--
>  2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/vmxnet3/vmxnet3_drv.c b/drivers/net/vmxnet3/vmxnet3_drv.c
> index db8022a..6f399b2 100644
> --- a/drivers/net/vmxnet3/vmxnet3_drv.c
> +++ b/drivers/net/vmxnet3/vmxnet3_drv.c
> @@ -1369,7 +1369,7 @@ vmxnet3_rq_rx_complete(struct vmxnet3_rx_queue *rq,
>  				rcdlro = (struct Vmxnet3_RxCompDescExt *)rcd;
>  
>  				segCnt = rcdlro->segCnt;
> -				BUG_ON(segCnt <= 1);
> +				BUG_ON(segCnt == 0);

What will the vmxnet3 driver do otherwise if segCnt == 0? Please see below.


>  				mss = rcdlro->mss;
>  				if (unlikely(segCnt <= 1))
>  					segCnt = 0;

Based on this code, it looks like it can handle the case without taking
down the kernel completely, so instead of a
"BUG_ON", would it make sense with a WARN_ON_ONCE() or WARN_ON()?

Thanks,
Thomas



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ