From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755408AbdCJO4U (ORCPT ); Fri, 10 Mar 2017 09:56:20 -0500 Received: from Galois.linutronix.de ([146.0.238.70]:56808 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753818AbdCJO4S (ORCPT ); Fri, 10 Mar 2017 09:56:18 -0500 Date: Fri, 10 Mar 2017 15:56:13 +0100 (CET) From: Thomas Gleixner To: Mike Galbraith cc: Borislav Petkov , "Tobin C. Harding" , LKML , Nicholas Mc Guire , Vivek Goyal , x86@kernel.org Subject: Re: kexec, x86/purgatory: Cleanup the unholy mess In-Reply-To: <1489156308.4706.0.camel@gmx.de> Message-ID: References: <1489153665.4410.4.camel@gmx.de> <1489156308.4706.0.camel@gmx.de> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 10 Mar 2017, Mike Galbraith wrote: > Stuffing the lot into .kexec-purgatory worked. You beat me to it :) And that's how that whole thing should have been done in the very beginning instead of relying on uncomprehensible compile/link magics. Thanks, tglx > --- > arch/x86/purgatory/purgatory.c | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) > > --- a/arch/x86/purgatory/purgatory.c > +++ b/arch/x86/purgatory/purgatory.c > @@ -16,13 +16,13 @@ > #include "sha256.h" > #include "../boot/string.h" > > -unsigned long purgatory_backup_dest; > -unsigned long purgatory_backup_src; > -unsigned long purgatory_backup_sz; > +unsigned long purgatory_backup_dest __section(.kexec-purgatory); > +unsigned long purgatory_backup_src __section(.kexec-purgatory); > +unsigned long purgatory_backup_sz __section(.kexec-purgatory); > > -u8 purgatory_sha256_digest[SHA256_DIGEST_SIZE]; > +u8 purgatory_sha256_digest[SHA256_DIGEST_SIZE] __section(.kexec-purgatory); > > -struct kexec_sha_region purgatory_sha_regions[KEXEC_SEGMENT_MAX]; > +struct kexec_sha_region purgatory_sha_regions[KEXEC_SEGMENT_MAX] __section(.kexec-purgatory); > > /* > * On x86, second kernel requries first 640K of memory to boot. Copy >