From: Mike Galbraith <efault@gmx.de>
To: Thomas Gleixner <tglx@linutronix.de>, Borislav Petkov <bp@alien8.de>
Cc: "Tobin C. Harding" <me@tobin.cc>,
LKML <linux-kernel@vger.kernel.org>,
Nicholas Mc Guire <der.herr@hofr.at>,
Vivek Goyal <vgoyal@redhat.com>,
x86@kernel.org
Subject: Re: kexec, x86/purgatory: Cleanup the unholy mess
Date: Fri, 10 Mar 2017 14:47:45 +0100 [thread overview]
Message-ID: <1489153665.4410.4.camel@gmx.de> (raw)
In-Reply-To: <alpine.DEB.2.20.1703101315140.3681@nanos>
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
-Mike
next prev parent reply other threads:[~2017-03-10 13:48 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-10 12:17 kexec, x86/purgatory: Cleanup the unholy mess Thomas Gleixner
2017-03-10 13:47 ` Mike Galbraith [this message]
2017-03-10 13:57 ` Thomas Gleixner
2017-03-10 14:24 ` Vivek Goyal
2017-03-10 14:58 ` Thomas Gleixner
2017-03-10 15:05 ` Vivek Goyal
2017-03-10 14:31 ` Mike Galbraith
2017-03-10 14:56 ` Thomas Gleixner
2017-03-10 14:58 ` Mike Galbraith
2017-03-10 15:31 ` Thomas Gleixner
2017-03-10 18:13 ` Mike Galbraith
2017-03-10 20:13 ` [tip:x86/urgent] kexec, x86/purgatory: Unbreak it and clean it up tip-bot for Thomas Gleixner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1489153665.4410.4.camel@gmx.de \
--to=efault@gmx.de \
--cc=bp@alien8.de \
--cc=der.herr@hofr.at \
--cc=linux-kernel@vger.kernel.org \
--cc=me@tobin.cc \
--cc=tglx@linutronix.de \
--cc=vgoyal@redhat.com \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.