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] [day] [month] [year] [list]
Date:   Thu, 08 Sep 2016 17:03:35 +0200
From:   Arnd Bergmann <arnd@...db.de>
To:     Dan Williams <dan.j.williams@...el.com>
Cc:     Johannes Thumshirn <jthumshirn@...e.de>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        kbuild test robot <lkp@...el.com>
Subject: Re: [PATCH] dax: use correct dev_t value

On Thursday, September 8, 2016 7:56:31 AM CEST Dan Williams wrote:
> On Thu, Sep 8, 2016 at 6:53 AM, Arnd Bergmann <arnd@...db.de> wrote:
> > The dev_t variable in devm_create_dax_dev() is used before it's
> > first set:
> >
> > drivers/dax/dax.c: In function 'devm_create_dax_dev':
> > drivers/dax/dax.c:205:39: error: 'dev_t' may be used uninitialized in this function [-Werror=maybe-uninitialized]
> >   inode = iget5_locked(dax_superblock, hash_32(devt + DAXFS_MAGIC, 31),
> >                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > drivers/dax/dax.c:688:8: note: 'dev_t' was declared here
> >
> > This reorders the code to how it looks correct to me.
> >
> 
> Looks good to me.
> 
> Strange, I don't see this error with gcc-5.3.1, I assume 0day missed
> it for a similar reason?

No, the warning is disabled by now since 6e8d666e9253 ("Disable
"maybe-uninitialized" warning globally"), which I have reverted
locally.

You can also build with -Wmaybe-uninitialized, but that causes
many false positives if any of these options are enabled:

CONFIG_CC_OPTIMIZE_FOR_SIZE
CONFIG_PROFILE_ALL_BRANCHES
CONFIG_UBSAN_SANITIZE_ALL
CONFIG_GCOV_PROFILE_ALL

I'm still trying to come up with a way to get the warning to
be useful again without annoying Linus too much.

	Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ