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: <1389213970.1644.39.camel@bwh-desktop.uk.level5networks.com>
Date:	Wed, 8 Jan 2014 20:46:10 +0000
From:	Ben Hutchings <bhutchings@...arflare.com>
To:	David Miller <davem@...emloft.net>
CC:	<ying.xue@...driver.com>, <steffen.klassert@...unet.com>,
	<dborkman@...hat.com>, <netdev@...r.kernel.org>
Subject: Re: [PATCH net-next] net: xfrm6: silence sparse warning

On Tue, 2014-01-07 at 22:43 -0500, David Miller wrote:
> From: Ying Xue <ying.xue@...driver.com>
> Date: Wed, 8 Jan 2014 10:56:40 +0800
> 
> > Fix below sparse warning:
> > 
> > net/ipv6/xfrm6_state.c:66:26: error: cannot size expression
>  ...
> > -	memset(count, 0, sizeof(count));
> > +	memset(count, 0, sizeof(int) * maxclass);
> 
> I think the fix belongs in sparse, making it respect these two expressions
> as equivalent.

It looks like sparse just doesn't support sizeof(VLA), although this is
valid C.

(It makes the same complaint about some places in sfc where we've used
min_t() in array dimensions, as that makes them VLAs even though the
size can actually be determined at compile time.)

Ben.

-- 
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ