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]
Date:   Sat, 16 Dec 2017 13:24:02 +0100
From:   Arnd Bergmann <arnd@...db.de>
To:     Yang Shi <yang.s@...baba-inc.com>
Cc:     Andrew Morton <akpm@...ux-foundation.org>,
        Michal Hocko <mhocko@...e.com>,
        "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
        Stephen Rothwell <sfr@...b.auug.org.au>,
        Vlastimil Babka <vbabka@...e.cz>,
        David Rientjes <rientjes@...gle.com>,
        Ingo Molnar <mingo@...nel.org>, Linux-MM <linux-mm@...ck.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] mm: thp: avoid uninitialized variable use

On Fri, Dec 15, 2017 at 7:01 PM, Yang Shi <yang.s@...baba-inc.com> wrote:
>
>
> On 12/15/17 4:51 AM, Arnd Bergmann wrote:
>>
>> When the down_read_trylock() fails, 'vma' has not been initialized
>> yet, which gcc now warns about:
>>
>> mm/khugepaged.c: In function 'khugepaged':
>> mm/khugepaged.c:1659:25: error: 'vma' may be used uninitialized in this
>> function [-Werror=maybe-uninitialized]
>
>
> Arnd,
>
> Thanks for catching this. I'm wondering why my test didn't catch it. It
> might be because my gcc is old. I'm using gcc 4.8.5 on centos 7.

Correct, gcc-4.8 and earlier have too many false-positive warnings with
-Wmaybe-uninitialized, so we turn it off on those versions. 4.9 is much
better here, but I'd recommend using gcc-6 or gcc-7 when you upgrade,
they have a much better set of default warnings besides producing better
binary code.

See http://git.infradead.org/users/segher/buildall.git for a simple way
to build toolchains suitable for building kernels in varying architectures
and versions.

       Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ