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: <20100916184735.1699492e@lxorguk.ukuu.org.uk>
Date:	Thu, 16 Sep 2010 18:47:35 +0100
From:	Alan Cox <alan@...rguk.ukuu.org.uk>
To:	Steven Rostedt <rostedt@...dmis.org>
Cc:	Dan Rosenberg <drosenberg@...curity.com>, j.dumon@...ion.com,
	linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
	security@...nel.org, davem@...emloft.net, stable@...nel.org
Subject: Re: [PATCH v2] drivers/net/usb/hso.c: prevent reading uninitialized
 memory

On Thu, 16 Sep 2010 12:52:40 -0400
Steven Rostedt <rostedt@...dmis.org> wrote:

> On Thu, 2010-09-16 at 18:07 +0100, Alan Cox wrote:
> > ->tiocmget;
> > > >  
> > > > +	memset(&icount, 0, sizeof(struct serial_icounter_struct));
> > > > +
> > > 
> > > Move the above to after the spinlocks.
> > 
> > Why - its a local variable ?
> > 
> > Easier to write
> > 
> > 	struct serial_icounter_struct icount = { 0 };
> > 
> > though
> 
> True, but if we want to micro-optimize, moving it after the spinlocks
> means we do no zero initialization in the tiocmget == 0. Although gcc
> may be smart enough to realize that too.

If you want to micro-optimise it you can enumerate the cases that
tiocmget can be NULL in that driver..
--
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