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]
Date:	Wed, 26 Jan 2011 13:24:58 -0800
From:	Joe Perches <joe@...ches.com>
To:	Eric Dumazet <eric.dumazet@...il.com>
Cc:	David Miller <davem@...emloft.net>, netdev@...r.kernel.org,
	john.r.fastabend@...el.com
Subject: Re: [PATCH net-next-2.6] net_sched: sch_mqprio: dont leak kernel
 memory

On Wed, 2011-01-26 at 21:23 +0100, Eric Dumazet wrote:
> Le mercredi 26 janvier 2011 à 11:55 -0800, David Miller a écrit :
> > From: Joe Perches <joe@...ches.com>
> > > I think the best style to use memset so that any
> > > possible struct padding is guaranteed to be zeroed.
> > Such padding does not exist, and we won't add such padding since this is
> > a user visible data structure and thus whose layout is cast in stone.
> > Anyways, I'm ambivalent to how this is fixed actually.
> I am perfectly aware of this ugly memset() style some people prefer, and
> 5 % of the time they swap 2nd and 3rd param.

Ugly maybe, but correct, definitely.
The same can not be said of the {0}.

This use ends up the same so it doesn't
matter here, it's just a style question.

> Two patches instead of one ;)

How uninteresting.  Any API can be misused.

> In this particular case, I only used existing codestyle: In the same
> file I noticed :

There are memset's in the file as well.
In fact, memset is used in the same function.

cheers, Joe

--
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