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:   Sun, 11 Nov 2018 01:47:27 +0000
From:   Ben Hutchings <ben@...adent.org.uk>
To:     Manfred Spraul <manfred@...orfullife.com>,
        Arnd Bergmann <arnd@...db.de>,
        "kernelci.org bot" <bot@...nelci.org>
Cc:     Kernel Build Reports Mailman List 
        <kernel-build-reports@...ts.linaro.org>,
        "3.16.x" <stable@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: stable/linux-3.16.y build: 178 builds: 1 failed, 177 passed, 2
 errors, 57 warnings (v3.16.52)

On Sat, 2018-01-13 at 19:51 +0100, Manfred Spraul wrote:
> Hi Arnd,
> 
> On 01/03/2018 12:15 AM, Arnd Bergmann wrote:
> > > 2 ipc/sem.c:377:6: warning: '___p1' may be used uninitialized in this function [-Wmaybe-uninitialized]
> > This code was last touched in 3.16 by the backport of commit
> > 5864a2fd3088 ("ipc/sem.c: fix complex_count vs. simple op race")
> > 
> > The warning is in "smp_load_acquire(&sma->complex_mode))", and I suspect
> > that commit 27d7be1801a4 ("ipc/sem.c: avoid using spin_unlock_wait()")
> > avoided the warning upstream by removing the smp_mb() before it.
> The smp_mb() pairs with spin_unlock_wait() in complexmode_enter()
> It is removed by commit 27d7be1801a4 ("ipc/sem.c: avoid using 
> spin_unlock_wait()").
> 
>  From what I see, it doesn't exist in any of the stable kernels 
> (intentionally, the above commit is a rewrite for better performance).
> 
> ___p1 is from smp_load_acquire()
>  >        typeof(*p) ___p1 = READ_ONCE(*p);                               \
> 
> I don't see how ___p1 could be used uninitialized. Perhaps a compiler issue?

On arm64 smp_load_acquire() was implemented in assembly that only
supported 4-byte and 8-byte words.  And complex_mode is a bool (1-byte) 
field.

So I believe the fix is:

878a84d5a8a1 arm64: add missing data types in smp_load_acquire/smp_store_release

Ben.

-- 
Ben Hutchings
Reality is just a crutch for people who can't handle science fiction.


Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ