)
+ * Copyright (C) 2006 Mohan Kumar M (mo...@in.ibm.com)
+ * Copyright (C) 2016 IBM Corporation
+ *
+ * Based on kexec-tools' kexec-elf-exec.c and kexec-elf-ppc64.c.
+ * Heavily modified for the kernel by
+ * Thiago Jung Bauermann <bauer...@linux.vnet.ibm.com>.
+ *
+ * This program is free so
Adds the machinery needed by kexec_file_load, except actually loading
a kernel and initrd.
elf64_apply_relocate_add was extended to support relative symbols. This
is necessary because before relocation, the module loading mechanism
adjusts Elf64_Sym.st_value to point to the absolute memory
The kexec_file_load system call needs to relocate the purgatory, so
factor out the module relocation code so that it can be shared.
This patch's purpose is to move the ELF relocation logic from
apply_relocate_add to elf_util_64.c with as few changes as
possible. The following changes were needed:
Allow architectures to specify different memory walking functions for
kexec_add_buffer. Intel uses iomem to track reserved memory ranges,
but PowerPC uses the memblock subsystem.
Also, factor kexec_locate_mem_hole out of kexec_add_buffer. It will be
used by the PowerPC kexec_file_load
When apply_relocate_add is called, modules are already loaded at their
final location in memory so Elf64_Shdr.sh_addr can be used for accessing
the section contents as well as the base address for relocations.
This is not the case for kexec's purgatory, because it will only be
copied to its final
intend to
submit shortly.
This code is based on kexec-tools, but with many modifications to adapt it to
the kernel environment and facilities. Except the purgatory, which only has
minimal changes.
Thiago Jung Bauermann (8):
kexec_file: Remove unused members from struct kexec_buf.
kexec_file
pc/kernel/elf_util.c
@@ -0,0 +1,476 @@
+/*
+ * Utility functions to work with ELF files.
+ *
+ * Copyright (C) 2016, IBM Corporation
+ *
+ * Based on kexec-tools' kexec-elf.c. Heavily modified for the
+ * kernel by Thiago Jung Bauermann <bauer...@linux.vnet.ibm.com>.
+ *
+ * This program is free so
This purgatory implementation comes from kexec-tools, almost unchanged.
The only changes were that the sha256_regions global variable was
renamed to sha_regions to match what kexec_file_load expects, and to
use the sha256.c file from x86's purgatory to avoid adding yet another
SHA-256
kexec_add_buffer uses kexec_buf.buffer and kexec_buf.bufsz to pass along
its own arguments buffer and bufsz, but since they aren't used anywhere
else, it's pointless.
Cc: Eric Biederman
Cc: ke...@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
---
kernel/kexec_file.c
kexec_add_buffer uses kexec_buf.buffer and kexec_buf.bufsz to pass along
its own arguments buffer and bufsz, but since they aren't used anywhere
else, it's pointless.
Signed-off-by: Thiago Jung Bauermann <bauer...@linux.vnet.ibm.com>
Cc: Eric Biederman <ebied...@xmission.co
the ELF structs. These functions will be used in the next
patch in the series.
Signed-off-by: Thiago Jung Bauermann <bauer...@linux.vnet.ibm.com>
Cc: ke...@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
---
arch/powerpc/include/asm/elf_util.h | 19 ++
arch/powerpc/kernel/Ma
from
elf64_apply_relocate_add.
local_entry_offset and squash_toc_save_inst were only used by
apply_rellocate_add, so they were moved to elf_util_64.c as well.
Signed-off-by: Thiago Jung Bauermann <bauer...@linux.vnet.ibm.com>
Cc: Benjamin Herrenschmidt <b...@kernel.crashing.org>
Cc: Pa
Allow architectures to specify different memory walking functions for
kexec_add_buffer. Intel uses iomem to track reserved memory ranges,
but PowerPC uses the memblock subsystem.
Signed-off-by: Thiago Jung Bauermann <bauer...@linux.vnet.ibm.com>
Cc: Eric Biederman <ebied...@xmission.com&
kexec_locate_mem_hole will be used by the PowerPC kexec_file_load
implementation to find free memory for the purgatory stack.
Signed-off-by: Thiago Jung Bauermann <bauer...@linux.vnet.ibm.com>
Cc: Eric Biederman <ebied...@xmission.com>
Cc: Dave Young <dyo...@red
location by adding an addr_base argument
to specify the address at which the section will be loaded, and rela,
loc_base and syms_base to point to the sections' contents.
Signed-off-by: Thiago Jung Bauermann <bauer...@linux.vnet.ibm.com>
Cc: Benjamin Herrenschmidt <b...@kernel.crashing.org&
by the purgatory.
Signed-off-by: Thiago Jung Bauermann <bauer...@linux.vnet.ibm.com>
Cc: ke...@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
---
arch/powerpc/include/asm/elf_util.h | 1 +
arch/powerpc/include/asm/kexec_elf_64.h | 10 +
arch/powerpc/kernel/Makefile| 5 +-
Adds the basic machinery needed by kexec_file_load.
Signed-off-by: Josh Sklar <sk...@linux.vnet.ibm.com>
Signed-off-by: Thiago Jung Bauermann <bauer...@linux.vnet.ibm.com>
Cc: ke...@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
---
arch/powerpc/Kconfig
implementation.
Signed-off-by: Thiago Jung Bauermann <bauer...@linux.vnet.ibm.com>
Cc: ke...@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
---
arch/powerpc/Makefile | 4 +
arch/powerpc/purgatory/.gitignore | 2 +
arch/powerpc/purgatory/Makefile
d relocation changes and the arch_kexec_walk_mem implementation to
the next patch in the series.
- Removed pr_fmt from machine_kexec_64.c, since the patch doesn't add
any call to pr_debug in that file.
- Changed arch_kexec_kernel_image_probe to reject crash kernels.
Thiago Jung Bauermann (9):
kexec
d, thus it is not necessary to pass these two in arguments.
>
> Moving above to arch_kexec_walk_mem will make it cleaner.
That's true. What about this version?
[]'s
Thiago Jung Bauermann
IBM Linux Technology Center
kexec_file: Generalize kexec_add_buffer.
Allow architectures to
/12/16 at 12:10am, Thiago Jung Bauermann wrote:
> > Allow architectures to specify different memory walking functions for
> > kexec_add_buffer. Intel uses iomem to track reserved memory ranges,
> > but PowerPC uses the memblock subsystem.
>
> Can the crashk_res be inserted to
Hi Dave,
Am Montag, 13 Juni 2016, 16:08:19 schrieb Thiago Jung Bauermann:
> Am Montag, 13 Juni 2016, 15:29:39 schrieb Dave Young:
> > On 06/12/16 at 12:10am, Thiago Jung Bauermann wrote:
> > > Allow architectures to specify different memory walking functions for
> > > k
Hello Balbir,
Am Mittwoch, 22 Juni 2016, 23:29:46 schrieb Balbir Singh:
> On Tue, 21 Jun 2016 16:48:32 -0300
> Thiago Jung Bauermann <bauer...@linux.vnet.ibm.com> wrote:
> > This patch series implements the kexec_file_load system call on
> > PowerPC.
> >
> >
Hello Dave,
Thanks for your considerations on this feature.
Am Mittwoch, 22 Juni 2016, 09:20:46 schrieb Dave Young:
> On 06/20/16 at 10:44pm, Thiago Jung Bauermann wrote:
> > This feature was implemented because the Integrity Measurement
> > Architecture subsystem needs
Am Donnerstag, 16 Juni 2016, 15:48:30 schrieb Michael Ellerman:
> On Tue, 2016-06-14 at 11:59 -0300, Thiago Jung Bauermann wrote:
> > Hello,
> >
> > This patch series implements the kexec_file_load system call on PowerPC.
>
> Can you tell me what this syscall does and
Am Donnerstag, 16 Juni 2016, 09:58:53 schrieb Dave Young:
> On 06/15/16 at 01:21pm, Thiago Jung Bauermann wrote:
> > +/**
> > + * arch_kexec_walk_mem - call func(data) on free memory regions
> > + * @image_type:kimage.type
> > + * @top_down: Start from the hig
Allow architectures to specify different memory walking functions for
kexec_add_buffer. Intel uses iomem to track reserved memory ranges,
but PowerPC uses the memblock subsystem.
Signed-off-by: Thiago Jung Bauermann <bauer...@linux.vnet.ibm.com>
Cc: Eric Biederman <ebied...@xmission.com&
from
elf64_apply_relocate_add.
local_entry_offset and squash_toc_save_inst were only used by
apply_rellocate_add, so they were moved to elf_util_64.c as well.
Signed-off-by: Thiago Jung Bauermann <bauer...@linux.vnet.ibm.com>
Cc: Benjamin Herrenschmidt <b...@kernel.crashing.org>
Cc: Pa
location by adding an addr_base argument
to specify the address at which the section will be loaded, and rela,
loc_base and syms_base to point to the sections' contents.
Signed-off-by: Thiago Jung Bauermann <bauer...@linux.vnet.ibm.com>
Cc: Benjamin Herrenschmidt <b...@kernel.crashing.org&
Adds the basic machinery needed by kexec_file_load.
Signed-off-by: Josh Sklar <sk...@linux.vnet.ibm.com>
Signed-off-by: Thiago Jung Bauermann <bauer...@linux.vnet.ibm.com>
Cc: ke...@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
---
arch/powerpc/Kconfig
by the purgatory.
Signed-off-by: Thiago Jung Bauermann <bauer...@linux.vnet.ibm.com>
Cc: ke...@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
---
arch/powerpc/include/asm/elf_util.h | 1 +
arch/powerpc/include/asm/kexec_elf_64.h | 10 +
arch/powerpc/kernel/Makefile| 5 +-
the ELF structs. These functions will be used in the next
patch in the series.
Signed-off-by: Thiago Jung Bauermann <bauer...@linux.vnet.ibm.com>
Cc: ke...@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
---
arch/powerpc/include/asm/elf_util.h | 19 ++
arch/powerpc/kernel/Ma
implementation.
Also, some formatting warnings found by checkpatch.pl were fixed.
Signed-off-by: Thiago Jung Bauermann <bauer...@linux.vnet.ibm.com>
Cc: ke...@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
---
arch/powerpc/Makefile | 4 +
arch/powerpc/purgatory/.git
ec_locate_mem_hole.
- Patch "powerpc: Implement kexec_file_load.":
- Moved relocation changes and the arch_kexec_walk_mem implementation
to the next patch in the series.
- Removed pr_fmt from machine_kexec_64.c, since the patch doesn't add
any call to pr_debug in that
kexec_locate_mem_hole will be used by the PowerPC kexec_file_load
implementation to find free memory for the purgatory stack.
Signed-off-by: Thiago Jung Bauermann <bauer...@linux.vnet.ibm.com>
Cc: Eric Biederman <ebied...@xmission.com>
Cc: Dave Young <dyo...@red
kexec_add_buffer uses kexec_buf.buffer and kexec_buf.bufsz to pass along
its own arguments buffer and bufsz, but since they aren't used anywhere
else, it's pointless.
Signed-off-by: Thiago Jung Bauermann <bauer...@linux.vnet.ibm.com>
Cc: Eric Biederman <ebied...@xmission.co
Am Freitag, 17 Juni 2016, 15:35:23 schrieb Dave Young:
> On 06/16/16 at 05:39pm, Thiago Jung Bauermann wrote:
> > Am Donnerstag, 16 Juni 2016, 09:58:53 schrieb Dave Young:
> > > On 06/15/16 at 01:21pm, Thiago Jung Bauermann wrote:
> > > > +int __weak arch_kexec_wa
also changed the description to refer to x86 arch
instead of Intel arch.
[]'s
Thiago Jung Bauermann
IBM Linux Technology Center
Subject: [PATCH 2/9] kexec_file: Allow arch-specific memory walking for
kexec_add_buffer
Allow architectures to specify a different memory walking function for
kexec_add
Am Mittwoch, 22 Juni 2016, 18:18:01 schrieb Dave Young:
> On 06/21/16 at 04:48pm, Thiago Jung Bauermann wrote:
> > +/**
> > + * kexec_locate_mem_hole - find free memory to load segment or use in
> > purgatory + * @image: kexec image being updated.
> > + * @size:
> "static").
>
> We also recommend providing kernel-doc formatted documentation
> for private (file "static") routines, for consistency of kernel
> source code layout. But this is lower priority and at the
> discretion of the MAINTAINER of that kernel source file.
If
Am Montag, 20 Juni 2016, 10:26:05 schrieb Dave Young:
> kexec_buf should go within #ifdef for kexec file like struct
> purgatory_info
>
> Other than that it looks good.
Great! Here it is.
--
[]'s
Thiago Jung Bauermann
IBM Linux Technology Center
kexec_file: Generalize kexe
une/016078.html
Thiago Jung Bauermann (6):
kexec_file: Add buffer hand-over support for the next kernel
powerpc: kexec_file: Add buffer hand-over support for the next kernel
kexec_file: Allow skipping checksum calculation for some segments.
kexec_file: Add mechanism to update kexec segment
the purgatory checksum verification to fail
when the machine is rebooted.
As a bonus, we don't need to special-case the purgatory segment anymore
to avoid checksumming it.
Adjust call sites for the new argument.
Signed-off-by: Thiago Jung Bauermann <bauer...@linux.vnet.ibm.com>
---
arch/p
Make kimage_load_normal_segment and kexec_update_segment share code
which they currently duplicate.
Signed-off-by: Thiago Jung Bauermann <bauer...@linux.vnet.ibm.com>
---
kernel/kexec_core.c | 159 +++-
1 file changed, 95 insertions(
kexec_update_segment allows a given segment in kexec_image to have
its contents updated. This is useful if the current kernel wants to
send information to the next kernel that is up-to-date at the time of
reboot.
Signed-off-by: Thiago Jung Bauermann <bauer...@linux.vnet.ibm.com>
---
i
This shows how kernel code can use the kexec buffer passing mechanism
to pass information to the next kernel.
This patch is not intended to be committed.
Signed-off-by: Thiago Jung Bauermann <bauer...@linux.vnet.ibm.com>
---
include/linux/ima.h | 11 +
kernel/kexec_
The buffer hand-over mechanism allows the currently running kernel to pass
data to kernel that will be kexec'd via a kexec segment. The second kernel
can check whether the previous kernel sent data and retrieve it.
This is the architecture-specific part.
Signed-off-by: Thiago Jung Bauermann
Jung Bauermann <bauer...@linux.vnet.ibm.com>
---
include/linux/kexec.h | 40 ++
kernel/kexec_file.c | 79 +++
2 files changed, 119 insertions(+)
diff --git a/include/linux/kexec.h b/include/linux/kexec.h
index a08cd9
Am Freitag, 24 Juni 2016, 08:33:24 schrieb Balbir Singh:
> On 24/06/16 02:44, Thiago Jung Bauermann wrote:
> > Sorry, I still don't understand your concern. What kind of cheating?
> > Which values? If it's the values in the event log, there's no need to
> > trust the old k
Am Donnerstag, 23 Juni 2016, 09:57:51 schrieb Balbir Singh:
> On 23/06/16 03:02, Thiago Jung Bauermann wrote:
> >>> 3. have IMA pass-on its event log (where integrity measurements are
> >>>
> >>>registered) accross kexec to the second kernel, so that
Am Dienstag, 28 Juni 2016, 00:19:48 schrieb Dave Young:
> On 06/23/16 at 12:37pm, Thiago Jung Bauermann wrote:
> > Am Donnerstag, 23 Juni 2016, 01:44:07 schrieb Dave Young:
> > What is bad about the description of top_down?
> It is not clear enough to me, I personally thin
Am Montag, 27 Juni 2016, 13:37:58 schrieb Thiago Jung Bauermann:
> Should I add a separate top_down argument to kexec_locate_mem_hole to
> control if the memory walk should be from top to bottom, and then the
> bottom_up member of struct kexec_buf controls where inside each memory
cc1: all warnings being treated as errors
I forgot to use defined() in the #if expression. Here’s the fixed version.
--
[]'s
Thiago Jung Bauermann
IBM Linux Technology Center
8< 8< 8< 8<
>From 27660a3b6c4147f9e1811b103cc47a34a53817c1 Mon Sep 17 00:00:00 2
Cc: Ingo Molnar <mi...@redhat.com>
Cc: Michael Ellerman <m...@ellerman.id.au>
Signed-off-by: Thiago Jung Bauermann <bauer...@linux.vnet.ibm.com>
---
arch/powerpc/include/asm/ftrace.h | 9 +
kernel/trace/ftrace.c | 13 +
2 files changed, 22 inser
Cc: Ingo Molnar <mi...@redhat.com>
Cc: Michael Ellerman <m...@ellerman.id.au>
Cc: linuxppc-...@lists.ozlabs.org
Signed-off-by: Thiago Jung Bauermann <bauer...@linux.vnet.ibm.com>
---
Notes:
Changes from v1 to v2:
- Use __weak mechanism instead of #ifdef.
- Return modified
tr, search);
> /* use tmp_str and then ignore */
> kfree(str);
If you decide against either of my alternatives for using
arch__compare_symbol_names, I'll change arch_ftrace_match_adjust to work as
you suggested above in the next version of this patch.
> ** Disclaimer **
>
> Note, I just took the red-eye (2 hours of sleep on the plane) and
> waiting for my next flight. My focus may be off in this email.
Ouch. Thanks for having a look at the patch and responding to my ping!
--
[]'s
Thiago Jung Bauermann
IBM Linux Technology Center
Hello,
Am Freitag, 01 April 2016, 18:28:06 schrieb Thiago Jung Bauermann:
> Am Samstag, 02 April 2016, 03:51:21 schrieb kbuild test robot:
> > >> arch/powerpc/include/asm/ftrace.h:62:5: error: "CONFIG_PPC64" is not
> > >> defined [-Werror=undef]
> >
];
}
Signed-off-by: AKASHI Takahiro <takahiro.aka...@linaro.org>
Signed-off-by: Thiago Jung Bauermann <bauer...@linux.vnet.ibm.com>
---
Notes:
This is a new version of the last patch in this series which adds
a function where each architecture can verify if the DTB i
Am Donnerstag, 14 Juli 2016, 10:29:11 schrieb Arnd Bergmann:
> On Wednesday, July 13, 2016 11:18:04 PM CEST Thiago Jung Bauermann wrote:
> > Am Mittwoch, 13 Juli 2016, 21:59:18 schrieb Arnd Bergmann:
> > > On Wednesday, July 13, 2016 3:45:41 PM CEST Thiago Jung Bauermann
Am Freitag, 22 Juli 2016, 12:54:28 schrieb Michael Ellerman:
> Thiago Jung Bauermann <bauer...@linux.vnet.ibm.com> writes:
> > So even if not ideal, the solution above is desirable for powerpc. We
> > would like to preserve the ability of allowing userspace to pass
> &g
Am Freitag, 15 Juli 2016, 18:03:35 schrieb Thiago Jung Bauermann:
> Am Freitag, 15 Juli 2016, 22:26:09 schrieb Arnd Bergmann:
> > However, the powerpc specific RTAS runtime services provide a similar
> > interface to the UEFI runtime support and allow to call into
> > binary
From: AKASHI Takahiro
Device tree blob must be passed to a second kernel on DTB-capable
archs, like powerpc and arm64, but the current kernel interface
lacks this support.
This patch adds dtb buffer information to struct kimage.
When users don't specify dtb
int nr_fds;
struct kexec_file_fd fds[0];
}
Signed-off-by: AKASHI Takahiro <takahiro.aka...@linaro.org>
Signed-off-by: Thiago Jung Bauermann <bauer...@linux.vnet.ibm.com>
---
include/linux/fs.h | 1 +
include/linux/kexec.h | 7 ++--
include/lin
atibility."
[1] http://lists.infradead.org/pipermail/kexec/2016-June/016276.html
AKASHI Takahiro (1):
kexec: add dtb info to struct kimage
Thiago Jung Bauermann (1):
kexec: extend kexec_file_load system call
include/linux/fs.h | 1 +
include/linux/kexec.h | 10 --
incl
Hello Sam,
Thanks for the quick response.
Am Freitag, 12 August 2016, 10:45:00 schrieb Samuel Mendoza-Jonas:
> On Thu, 2016-08-11 at 20:08 -0300, Thiago Jung Bauermann wrote:
> > @@ -908,4 +909,245 @@ bool find_debug_console(const void *fdt, int
> > chosen_nod
the ELF structs. These functions will be used in the next
patch in the series.
Signed-off-by: Thiago Jung Bauermann <bauer...@linux.vnet.ibm.com>
---
arch/powerpc/include/asm/elf_util.h | 19 ++
arch/powerpc/kernel/Makefile| 2 +-
arch/powerpc/kernel/elf_util.c
from
elf64_apply_relocate_add.
local_entry_offset and squash_toc_save_inst were only used by
apply_rellocate_add, so they were moved to elf_util_64.c as well.
Signed-off-by: Thiago Jung Bauermann <bauer...@linux.vnet.ibm.com>
---
arch/powerpc/include/asm/elf_util.h | 70
arch/p
Allow architectures to specify a different memory walking function for
kexec_add_buffer. x86 uses iomem to track reserved memory ranges, but
PowerPC uses the memblock subsystem.
Signed-off-by: Thiago Jung Bauermann <bauer...@linux.vnet.ibm.com>
Acked-by: Dave Young <dyo...@r
before relocating the module, while the latter does that
adjustment during relocation of the purgatory.
Also, add a check_symbols argument so that the kexec code can be stricter
about undefined symbols.
Finally, add relocation types used by the purgatory.
Signed-off-by: Thiago Jung Bauermann
Am Mittwoch, 10 August 2016, 13:41:08 schrieb Michael Ellerman:
> Thiago Jung Bauermann <bauer...@linux.vnet.ibm.com> writes:
> > Am Dienstag, 09 August 2016, 09:01:13 schrieb Mimi Zohar:
> >> On Tue, 2016-08-09 at 20:59 +1000, Michael Ellerman wrote:
> >> >
Hello Balbir,
Thank you for the review!
Am Freitag, 12 August 2016, 18:17:39 schrieb Balbir Singh:
> On Thu, Aug 11, 2016 at 08:03:58PM -0300, Thiago Jung Bauermann wrote:
> > diff --git a/include/linux/fs.h b/include/linux/fs.h
> > index 3523bf62f328..847d9c31f428 100644
> >
The buffer hand-over mechanism allows the currently running kernel to pass
data to kernel that will be kexec'd via a kexec segment. The second kernel
can check whether the previous kernel sent data and retrieve it.
This is the architecture-specific part.
Signed-off-by: Thiago Jung Bauermann
the purgatory checksum verification to fail
when the machine is rebooted.
As a bonus, we don't need to special-case the purgatory segment anymore
to avoid checksumming it.
Adjust call sites for the new argument.
Signed-off-by: Thiago Jung Bauermann <bauer...@linux.vnet.ibm.com>
---
arch/p
y "#include " in kexec_file.c.
- Round up memsz argument to PAGE_SIZE.
- Check if kexec_image is NULL in kexec_update_segment.
- Patch "IMA: Demonstration code for kexec buffer passing."
- Avoid registering reboot notifier again if kexec_file_load is called
more than once
Make kimage_load_normal_segment and kexec_update_segment share code
which they currently duplicate.
Signed-off-by: Thiago Jung Bauermann <bauer...@linux.vnet.ibm.com>
---
kernel/kexec_core.c | 159 +++-
1 file changed, 95 insertions(
This patch is not intended to be committed.
It shows how kernel code can use the kexec buffer passing mechanism
to pass information to the next kernel.
Signed-off-by: Thiago Jung Bauermann <bauer...@linux.vnet.ibm.com>
---
include/linux/ima.h | 11 +
kernel/kexec_
kexec_update_segment allows a given segment in kexec_image to have
its contents updated. This is useful if the current kernel wants to
send information to the next kernel that is up-to-date at the time of
reboot.
Signed-off-by: Thiago Jung Bauermann <bauer...@linux.vnet.ibm.com>
---
i
Jung Bauermann <bauer...@linux.vnet.ibm.com>
---
include/linux/kexec.h | 29 ++
kernel/kexec_file.c | 68 +++
2 files changed, 97 insertions(+)
diff --git a/include/linux/kexec.h b/include/linux/kexec.h
index ceccc5
kexec_locate_mem_hole will be used by the PowerPC kexec_file_load
implementation to find free memory for the purgatory stack.
Signed-off-by: Thiago Jung Bauermann <bauer...@linux.vnet.ibm.com>
Acked-by: Dave Young <dyo...@redhat.com>
---
include/linux/kexec.h | 1 +
kernel/kexec_f
arch_kexec_walk_mem and arch_kexec_apply_relocations_add are used by
generic kexec code, while setup_purgatory is powerpc-specific and sets
runtime variables needed by the powerpc purgatory implementation.
Signed-off-by: Josh Sklar <sk...@linux.vnet.ibm.com>
Signed-off-by: Thiago Jung Bau
location by adding an addr_base argument
to specify the address at which the section will be loaded, and rela,
loc_base and syms_base to point to the sections' contents.
Signed-off-by: Thiago Jung Bauermann <bauer...@linux.vnet.ibm.com>
---
arch/powerpc/include/asm/elf_util.h | 6 ++--
arch/p
Ellerman <m...@ellerman.id.au>
Signed-off-by: Thiago Jung Bauermann <bauer...@linux.vnet.ibm.com>
---
arch/powerpc/include/asm/kexec.h | 1 +
arch/powerpc/kernel/kexec_elf_64.c | 9 ++
arch/powerpc/kernel/machine_kexec_64.c | 242 +
3 files
(shar...@in.ibm.com)
+ * Copyright (C) 2006 Mohan Kumar M (mo...@in.ibm.com)
+ * Copyright (C) 2016 IBM Corporation
+ *
+ * Based on kexec-tools' kexec-elf-exec.c and kexec-elf-ppc64.c.
+ * Heavily modified for the kernel by
+ * Thiago Jung Bauermann <bauer...@linux.vnet.ibm.com>.
+ *
+ * This pro
implementation.
Also, some formatting warnings found by checkpatch.pl were fixed.
Signed-off-by: Thiago Jung Bauermann <bauer...@linux.vnet.ibm.com>
---
arch/powerpc/Makefile | 4 +
arch/powerpc/purgatory/.gitignore | 2 +
arch/powerpc/purgatory/Makefile
kexec_file_load needs to set up the device tree that will be used
by the next kernel and check whether it provides a console
that can be used by the purgatory.
Signed-off-by: Thiago Jung Bauermann <bauer...@linux.vnet.ibm.com>
---
arch/powerpc/include/asm/kexec.h | 3 +
arch/p
Adapt all callers to the new function prototype.
In addition, change the type of kexec_buf.buffer from char * to void *.
There is no particular reason for it to be a char *, and the change
allows us to get rid of 3 existing casts to char * in the code.
Signed-off-by: Thiago Jung Bauermann <ba
Enable CONFIG_KEXEC_FILE in powernv_defconfig, ppc64_defconfig and
pseries_defconfig.
It depends on CONFIG_CRYPTO_SHA256=y, so add that as well.
Signed-off-by: Thiago Jung Bauermann <bauer...@linux.vnet.ibm.com>
---
arch/powerpc/configs/powernv_defconfig | 2 ++
arch/powerpc/c
ralize kexec_add_buffer.": broke in two, one
adding arch_kexec_walk_mem and the other adding kexec_locate_mem_hole.
- Patch "powerpc: Implement kexec_file_load.":
- Moved relocation changes and the arch_kexec_walk_mem implementation
to the next patch in the series.
- Removed pr
ith it, as Stewart mentioned in another email.
2. Set display properties on /pciex@n/.../vga@0 in machines with an
OpenFirmware framebuffer.
--
[]'s
Thiago Jung Bauermann
IBM Linux Technology Center
Am Mittwoch, 13 Juli 2016, 21:59:18 schrieb Arnd Bergmann:
> On Wednesday, July 13, 2016 3:45:41 PM CEST Thiago Jung Bauermann wrote:
> > Am Mittwoch, 13 Juli 2016, 15:13:42 schrieb Arnd Bergmann:
> > > On Wednesday, July 13, 2016 10:41:28 AM CEST Mark Rutland wrote:
> >
managing system
(BMC) is considered a physical attack or a remote attack in the context of
UEFI Secure Boot.
--
[]'s
Thiago Jung Bauermann
IBM Linux Technology Center
Am Freitag, 15 Juli 2016, 14:33:47 schrieb Mark Rutland:
> On Fri, Jul 15, 2016 at 09:26:10AM -0400, Vivek Goyal wrote:
> > On Fri, Jul 15, 2016 at 09:31:02AM +0200, Arnd Bergmann wrote:
> > > On Thursday, July 14, 2016 10:44:14 PM CEST Thiago Jung Bauermann
wrote:
> > &g
hosen to avoid the problem Mark mentioned.
Still doable, but not ideal. :-/
--
[]'s
Thiago Jung Bauermann
IBM Linux Technology Center
s
kexec to load the target OS. It has to modify the device tree that will be
used by the next kernel so that the next kernel uses the same console that
petitboot was configured to use (i.e., set the /chosen/linux,stdout-path
property). It also modifies the device tree to allow the kernel to inherit
Petitboot's Openfirmware framebuffer.
--
[]'s
Thiago Jung Bauermann
IBM Linux Technology Center
h userspace for this.
>
> Until a persuasive case can be made for going around the kernel and
> probably adding a feature (like code execution) that can be used to
> defeat the signature scheme I am going to nack this.
I also don't understand what you mean by code execution. How does p
Am Dienstag, 28 Juni 2016, 15:20:55 schrieb Dave Young:
> On 06/27/16 at 04:21pm, Dave Young wrote:
> > Please ignore previous reply, I mistakenly send a broken mail without
> > subject, sorry about it. Resend the reply here.
> >
> > On 06/27/16 at 01:37pm, Thiago Jun
Am Donnerstag, 23 Juni 2016, 10:25:06 schrieb Dave Young:
> On 06/22/16 at 08:30pm, Thiago Jung Bauermann wrote:
> > Am Mittwoch, 22 Juni 2016, 18:20:47 schrieb Dave Young:
> > > The patch looks good, but could the subject be more specific?
> > >
> > > For
Hello,
Am Montag, 04 Juli 2016, 15:58:15 schrieb AKASHI Takahiro:
> On Fri, Jul 01, 2016 at 12:46:31PM -0300, Thiago Jung Bauermann wrote:
> > I agree that it would be better if we could have a system call where a
>
> > custom device tree could be passed. One suggestion is:
by the purgatory.
Signed-off-by: Thiago Jung Bauermann <bauer...@linux.vnet.ibm.com>
Cc: Benjamin Herrenschmidt <b...@kernel.crashing.org>
Cc: Paul Mackerras <pau...@samba.org>
Cc: Michael Ellerman <m...@ellerman.id.au>
---
arch/powerpc/include/asm/elf_util.h | 1 +
location by adding an addr_base argument
to specify the address at which the section will be loaded, and rela,
loc_base and syms_base to point to the sections' contents.
Signed-off-by: Thiago Jung Bauermann <bauer...@linux.vnet.ibm.com>
Cc: Benjamin Herrenschmidt <b...@kernel.crashing.org&
1 - 100 of 1092 matches
Mail list logo