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: <alpine.DEB.2.20.1703101457160.3681@nanos>
Date:   Fri, 10 Mar 2017 14:57:38 +0100 (CET)
From:   Thomas Gleixner <tglx@...utronix.de>
To:     Mike Galbraith <efault@....de>
cc:     Borislav Petkov <bp@...en8.de>, "Tobin C. Harding" <me@...in.cc>,
        LKML <linux-kernel@...r.kernel.org>,
        Nicholas Mc Guire <der.herr@...r.at>,
        Vivek Goyal <vgoyal@...hat.com>, x86@...nel.org
Subject: Re: kexec, x86/purgatory: Cleanup the unholy mess

On Fri, 10 Mar 2017, Mike Galbraith wrote:
> On Fri, 2017-03-10 at 13:17 +0100, Thomas Gleixner wrote:
> > The purgatory code defines global variables which are referenced via a
> > symbol lookup in the kexec code (core and arch).
> > 
> > A recent commit addressing sparse warning made these static and thereby
> > broke kexec file.
> > 
> > Why did this happen? Simply because the whole machinery is undocumented and
> > lacks any form of forward declarations. The variable names are unspecific
> > and lack a prefix, so adding forward declarations creates shadow variables
> > in the core code. Aside of that the code relies on magic constants and
> > duplicate struct definitions with no way to ensure that these things stay
> > in sync.
> > 
> > Unbreak kexec and cleanup the mess by:
> > 
> >  - Adding proper forward declarations and document the usage
> >  - Use the proper common defines instead of magic constants
> >  - Add a purgatory_ prefix to have a proper name space
> >  - Use ARRAY_SIZE() instead of a homebrewn reimplementation
> > 
> > Fixes: 72042a8c7b01 ("x86/purgatory: Make functions and variables static")
> 
> Well, almost fixes.
> 
> [   15.118820] kexec: symbol 'purgatory_sha_regions' in common section
> [   15.119187] kexec-bzImage64: Loading purgatory failed

Bah. /me goes to investigate.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ