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: <20100604083031.GE31073@ZenIV.linux.org.uk>
Date:	Fri, 4 Jun 2010 09:30:31 +0100
From:	Al Viro <viro@...IV.linux.org.uk>
To:	Borislav Petkov <bp@...en8.de>, Changli Gao <xiaosuo@...il.com>,
	linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] fs: optimize mpage_readpage()

On Fri, Jun 04, 2010 at 10:13:22AM +0200, Borislav Petkov wrote:
> > > > -	bio = do_mpage_readpage(bio, page, 1, &last_block_in_bio,
> > > > +	bio = do_mpage_readpage(NULL, page, 1, &last_block_in_bio,

> Right, the uninitialized warning above happens when you remove the NULL
> assignment, i.e.
> 
> struct bio *bio;
> 
> ...
> 
> bio = do_mpage_readpage(bio, ...)

WTF?  His patch does *NOT* leave you with bio = do_mpage_readpage(bio, ...),
it replaces that with bio = do_mpage_readpage(NULL, ...).

Which variant has produced a warning?

> But(!), in the mpage_readpage(), bio _absolutely_ has to be NULL because
> it is checked if being so later in do_mpage_readpage(), so this one is a
> complete different story.
> 
> To cut a long story short, you're correct, gcc is b0rked when warning
> about passing addresses of variables to functions which only write to
> them.

To make it even shorter, you've misapplied the patch.  Correct?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ