From: Shaun Ruffell <sruffell@digium.com>
To: Vivek Goyal <vgoyal@redhat.com>
Cc: linux-kernel@vger.kernel.org, kexec@lists.infradead.org,
ebiederm@xmission.com, hpa@zytor.com, mjg59@srcf.ucam.org,
greg@kroah.com, bp@alien8.de, dyoung@redhat.com,
chaowang@redhat.com, bhe@redhat.com, akpm@linux-foundation.org
Subject: Re: [PATCH 11/15] purgatory: Core purgatory functionality
Date: Mon, 11 Aug 2014 12:40:18 -0500 [thread overview]
Message-ID: <20140811174017.GD12610@digium.com> (raw)
In-Reply-To: <1403814824-7587-12-git-send-email-vgoyal@redhat.com>
FYI, it looks like the following patch (committed in
8fc5b4d4121c95482b2583) adds a new requirement to use at least gcc
4.4 to build the kernel?
On Thu, Jun 26, 2014 at 04:33:40PM -0400, Vivek Goyal wrote:
> Create a stand alone relocatable object purgatory which runs between two
> kernels. This name, concept and some code has been taken from kexec-tools.
> Idea is that this code runs after a crash and it runs in minimal environment.
> So keep it separate from rest of the kernel and in long term we will have
> to practically do no maintenance of this code.
>
> This code also has the logic to do verify sha256 hashes of various
> segments which have been loaded into memory. So first we verify that
> the kernel we are jumping to is fine and has not been corrupted and
> make progress only if checsums are verified.
>
> This code also takes care of copying some memory contents to backup region.
>
> Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
> ---
> arch/x86/Kbuild | 4 ++
> arch/x86/Makefile | 8 +++
> arch/x86/purgatory/Makefile | 30 +++++++++++
> arch/x86/purgatory/entry64.S | 101 ++++++++++++++++++++++++++++++++++++++
> arch/x86/purgatory/purgatory.c | 72 +++++++++++++++++++++++++++
> arch/x86/purgatory/setup-x86_64.S | 58 ++++++++++++++++++++++
> arch/x86/purgatory/stack.S | 19 +++++++
> arch/x86/purgatory/string.c | 13 +++++
> 8 files changed, 305 insertions(+)
> create mode 100644 arch/x86/purgatory/Makefile
> create mode 100644 arch/x86/purgatory/entry64.S
> create mode 100644 arch/x86/purgatory/purgatory.c
> create mode 100644 arch/x86/purgatory/setup-x86_64.S
> create mode 100644 arch/x86/purgatory/stack.S
> create mode 100644 arch/x86/purgatory/string.c
>
[snip]
> diff --git a/arch/x86/purgatory/Makefile b/arch/x86/purgatory/Makefile
> new file mode 100644
> index 0000000..e5829dd
> --- /dev/null
> +++ b/arch/x86/purgatory/Makefile
> @@ -0,0 +1,30 @@
> +purgatory-y := purgatory.o stack.o setup-x86_$(BITS).o sha256.o entry64.o string.o
> +
> +targets += $(purgatory-y)
> +PURGATORY_OBJS = $(addprefix $(obj)/,$(purgatory-y))
> +
> +LDFLAGS_purgatory.ro := -e purgatory_start -r --no-undefined -nostdlib -z nodefaultlib
> +targets += purgatory.ro
> +
> +# Default KBUILD_CFLAGS can have -pg option set when FTRACE is enabled. That
> +# in turn leaves some undefined symbols like __fentry__ in purgatory and not
> +# sure how to relocate those. Like kexec-tools, use custom flags.
> +
> +KBUILD_CFLAGS := -fno-strict-aliasing -Wall -Wstrict-prototypes -fno-zero-initialized-in-bss -fno-builtin -ffreestanding -c -MD -Os -mcmodel=large
The above "-mcmodel=large" compiler flag produces the following output on GCC 4.1.2.
$ make modules_prepare ; gcc --version
CHK include/config/kernel.release
CHK include/generated/uapi/linux/version.h
CHK include/generated/utsrelease.h
CC arch/x86/purgatory/purgatory.o
arch/x86/purgatory/purgatory.c:1: sorry, unimplemented: code model ‘large’ not supported yet
make[1]: *** [arch/x86/purgatory/purgatory.o] Error 1
make: *** [archprepare] Error 2
gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-54)
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
I did a quick search for a discussion the indicates this compiler is now
officially too old to build the kernel but did not find one.
If this is required, maybe Documentation/Changes needs to be updated
with the new minimum required version?
Cheers,
Shaun
next prev parent reply other threads:[~2014-08-11 17:40 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-26 20:33 [PATCH 00/15][V4] kexec: A new system call to allow in kernel loading Vivek Goyal
2014-06-26 20:33 ` [PATCH 01/15] bin2c: Move bin2c in scripts/basic Vivek Goyal
2014-06-26 20:33 ` [PATCH 02/15] kernel: Build bin2c based on config option CONFIG_BUILD_BIN2C Vivek Goyal
2014-06-26 20:33 ` [PATCH 03/15] kexec: rename unusebale_pages to unusable_pages Vivek Goyal
2014-06-26 20:33 ` [PATCH 04/15] kexec: Move segment verification code in a separate function Vivek Goyal
2014-06-26 20:33 ` [PATCH 05/15] kexec: Use common function for kimage_normal_alloc() and kimage_crash_alloc() Vivek Goyal
2014-06-26 20:33 ` [PATCH 06/15] resource: Provide new functions to walk through resources Vivek Goyal
2014-06-26 20:33 ` [PATCH 07/15] kexec: Make kexec_segment user buffer pointer a union Vivek Goyal
2014-06-26 20:33 ` [PATCH 08/15] kexec: New syscall kexec_file_load() declaration Vivek Goyal
2014-06-26 20:43 ` Vivek Goyal
2014-06-26 21:03 ` Andy Lutomirski
2014-06-27 11:50 ` Vivek Goyal
2014-06-27 12:20 ` Michael Kerrisk (man-pages)
2014-06-26 20:33 ` [PATCH 09/15] kexec: Implementation of new syscall kexec_file_load Vivek Goyal
2014-06-26 20:58 ` Andrew Morton
2014-06-27 16:31 ` Vivek Goyal
2014-07-01 20:25 ` Vivek Goyal
2014-06-26 20:33 ` [PATCH 10/15] purgatory/sha256: Provide implementation of sha256 in purgaotory context Vivek Goyal
2014-06-26 20:33 ` [PATCH 11/15] purgatory: Core purgatory functionality Vivek Goyal
2014-08-11 17:40 ` Shaun Ruffell [this message]
2014-08-11 17:51 ` H. Peter Anvin
2014-08-11 18:02 ` Vivek Goyal
2014-08-11 18:08 ` H. Peter Anvin
2014-08-11 18:15 ` Vivek Goyal
2014-08-11 20:23 ` Vivek Goyal
2014-06-26 20:33 ` [PATCH 12/15] kexec: Load and Relocate purgatory at kernel load time Vivek Goyal
2014-06-26 20:33 ` [PATCH 13/15] kexec-bzImage64: Support for loading bzImage using 64bit entry Vivek Goyal
2014-06-26 20:33 ` [PATCH 14/15] kexec: Support for kexec on panic using new system call Vivek Goyal
2014-06-26 20:33 ` [PATCH 15/15] kexec: Support kexec/kdump on EFI systems Vivek Goyal
2014-07-01 19:46 ` Matt Fleming
2014-07-01 20:14 ` Andrew Morton
2014-07-01 20:21 ` Vivek Goyal
2014-07-01 21:23 ` Matt Fleming
2014-07-01 20:09 ` [PATCH 17/15] kexec-bzimage: Change EFI helper function names Vivek Goyal
2014-06-26 20:39 ` [PATCH 00/15][V4] kexec: A new system call to allow in kernel loading Vivek Goyal
2014-06-26 20:58 ` Andrew Morton
2014-06-26 21:21 ` Borislav Petkov
2014-06-27 11:33 ` Vivek Goyal
2014-06-27 16:34 ` [PATCH 16/15] kexec: Fix freeing up for image loader data loading Vivek Goyal
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=20140811174017.GD12610@digium.com \
--to=sruffell@digium.com \
--cc=akpm@linux-foundation.org \
--cc=bhe@redhat.com \
--cc=bp@alien8.de \
--cc=chaowang@redhat.com \
--cc=dyoung@redhat.com \
--cc=ebiederm@xmission.com \
--cc=greg@kroah.com \
--cc=hpa@zytor.com \
--cc=kexec@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mjg59@srcf.ucam.org \
--cc=vgoyal@redhat.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox