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:   Fri, 25 Jan 2019 05:14:22 +1000
From:   David Airlie <airlied@...hat.com>
To:     Greg KH <gregkh@...uxfoundation.org>
Cc:     Will Deacon <will.deacon@....com>,
        linux-kernel <linux-kernel@...r.kernel.org>,
        stable <stable@...r.kernel.org>
Subject: Re: [PATCH stable-4.9.y] locking/qspinlock: Pull in asm/byteorder.h
 to ensure correct endianness

On Fri, Jan 25, 2019 at 5:04 AM Greg KH <gregkh@...uxfoundation.org> wrote:
>
> On Thu, Jan 24, 2019 at 06:54:15PM +0000, Will Deacon wrote:
> > From: Dave Airlie <airlied@...hat.com>
> >
> > This commit is not required upstream, but is required for the 4.9.y
> > stable series.
> >
> > Upstream commit 101110f6271c ("Kbuild: always define endianess in
> > kconfig.h") ensures that either __LITTLE_ENDIAN or __BIG_ENDIAN is
> > defined to reflect the endianness of the target CPU architecture
> > regardless of whether or not <asm/byteorder.h> has been #included. The
> > upstream definition of 'struct qspinlock' relies on this property.
> >
> > Unfortunately, the 4.9.y stable series does not provide this guarantee,
> > so the 'spin_unlock()' routine can erroneously treat the underlying
> > lockword as big-endian on little-endian architectures using native
> > qspinlock (i.e. x86_64 without PV) if the caller has not included
> > <asm/byteorder.h>. This can lead to hangs such as the one in
> > 'i915_gem_request()' reported via bugzilla:
> >
> >   https://bugzilla.kernel.org/show_bug.cgi?id=202063
> >
> > Fix the issue by ensuring that <asm/byteorder.h> is #included in
> > <asm/qspinlock_types.h>, where 'struct qspinlock' is defined.
>
> That is crazy...

You've no idea, we've spent a couple of days at LCA figuring it all out :-)

Dave.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ