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: <20170531152151.GT27783@dhcp22.suse.cz>
Date:   Wed, 31 May 2017 17:21:51 +0200
From:   Michal Hocko <mhocko@...nel.org>
To:     Nick Desaulniers <nick.desaulniers@...il.com>
Cc:     akpm@...ux-foundation.org, hannes@...xchg.org,
        mgorman@...hsingularity.net, vbabka@...e.cz, minchan@...nel.org,
        linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [Patch v2] mm/vmscan: fix unsequenced modification and access
 warning

On Thu 25-05-17 21:43:43, Nick Desaulniers wrote:
> On Tue, May 16, 2017 at 10:27:46AM +0200, Michal Hocko wrote:
> > I guess it is worth reporting this to clang bugzilla. Could you take
> > care of that Nick?
> 
> >From https://bugs.llvm.org//show_bug.cgi?id=33065#c5
> it seems that this is indeed a sequence bug in the previous version of
> this code and not a compiler bug.  You can read that response for the
> properly-cited wording but my TL;DR/understanding is for the given code:
> 
> struct foo bar = {
>   .a = (c = 0),
>   .b = c,
> };
> 
> That the compiler is allowed to reorder the initializations of bar.a and
> bar.b, so what the value of c here might not be what you expect.

This is interesting because what I hear from our gcc people is something
different. I am not in a possition to argue here, though.
-- 
Michal Hocko
SUSE Labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ