Hi,
On 01/07/2018 08:26 AM, David Michael wrote:
> As seen in GCC's gcc/config/aarch64/aarch64.c, -fPIC with large
> code model is unsupported. This fixes the "sorry, unimplemented"
> errors when building with compilers defaulting to -fPIC.
> ---
>
> purgatory/arch/arm64/entry.S:1:0: sorry,
On 02/02/2018 02:42 AM, Eric W. Biederman wrote:
> Jan H. Schönherr writes:
>
>> Give the administrator the ability to trade kexec safety for kexec speed
>> by disabling the digest calculation/verification for regular kexecs.
>>
>> The behavior of kexec-on-crash is not
I tested this fix and it works well. I am wondering which kexec tool release
will pick this fix?
On 8/24/2017 1:32 AM, AKASHI Takahiro wrote:
> Normally vmlinux for arm64 is of ET_EXEC type, while if built with
> CONFIG_RANDAMIZE_BASE (that is KASLR), it will be of ET_DYN type.
> Meanwhile,
Add an image loader for kexec_file_load. For simplicity first skip crash
support. The functions defined in machine_kexec_file will later be shared
with the ELF loader.
Signed-off-by: Philipp Rudo
Reviewed-by: Martin Schwidefsky
---
The main loop currently uses quite a lot of variables to update the section
headers. Some of them are unnecessary. So clean them up a little.
Signed-off-by: Philipp Rudo
---
kernel/kexec_file.c | 34 --
1 file changed, 12 insertions(+),
When building the kernel with CONFIG_KEXEC_FILE enabled gcc prints a
compile warning multiple times.
In file included from /linux/init/initramfs.c:526:0:
/include/linux/kexec.h:120:9: warning: ‘struct kimage’ declared inside
parameter list [enabled by default]
unsigned long
Add an ELF loader for kexec_file. The main task here is to do proper sanity
checks on the ELF file. Basically all other functionality was already
implemented for the image loader.
Signed-off-by: Philipp Rudo
---
arch/s390/include/asm/kexec.h | 1 +
This patch adds the kexec_file_load system call to s390 as well as the arch
specific functions common code requires to work. Loaders for the different
file types will be added later.
Signed-off-by: Philipp Rudo
---
arch/s390/Kconfig | 4 +
The kexec_purgatory buffer is read-only. Thus all pointers into
kexec_purgatory are read-only, too. Point this out by explicitly marking
purgatory_info->ehdr as 'const' and update the comments in purgatory_info.
Signed-off-by: Philipp Rudo
---
include/linux/kexec.h |
kexec_file_load needs to prepare the new kernels before they are loaded.
For that it has to know the offsets in head.S, e.g. to register the new
command line. Unfortunately there are no macros right now defining those
offsets. Define them now.
Signed-off-by: Philipp Rudo
The common code expects the architecture to have a purgatory that runs
between the two kernels. Add it now. For simplicity first skip crash
support.
Signed-off-by: Philipp Rudo
---
arch/s390/Kbuild | 1 +
arch/s390/include/asm/purgatory.h | 17 +++
Add support to load a crash kernel to the image loader. This requires
extending the purgatory.
Signed-off-by: Philipp Rudo
Reviewed-by: Martin Schwidefsky
---
arch/s390/kernel/kexec_image.c| 6 +-
arch/s390/kernel/machine_kexec_file.c
The code to verify the new kernels sha digest are applicable for all
architectures. Move it to common code.
Signed-off-by: Philipp Rudo
---
arch/x86/purgatory/Makefile| 3 +++
arch/x86/purgatory/purgatory.c | 2 +-
Hi everybody
this series adds the kexec_file_load system call to s390. Before the system
call is added there are some preparations/clean ups to common
kexec_file_load. In detail this series contains:
Patch #1&2: Minor cleanups/fixes.
Patch #3-9: Clean up the purgatory load/relocation code.
The current code uses the sh_offset field in purgatory_info->sechdrs to
store a pointer to the current load address of the section. Depending
whether the section will be loaded or not this is either a pointer into
purgatory_info->purgatory_buf or kexec_purgatory. This is not only a
violation of
When inspecting __kexec_load_purgatory you find that it has two tasks
1) setting up the kexec_buffer for the new kernel and,
2) setting up pi->sechdrs for the final load address.
The two tasks are independent of each other. To improve readability split
up __kexec_load_purgatory
Before the purgatory is loaded several checks are done whether the ELF file
in kexec_purgatory is valid or not. These checks are incomplete. For
example they don't check for the total size of the sections defined in the
section header table or if the entry point actually points into the
purgatory.
To update the entry point there is an extra loop over all section headers
although this can be done in the main loop. So move it there and eliminate
the extra loop and variable to store the 'entry section index'.
Also, in the main loop, move the usual case, i.e. non-bss section, out of
the extra
When the relocations are applied to the purgatory only the section the
relocations are applied to is writable. The other sections, i.e. the symtab
and .rel/.rela, are in read-only kexec_purgatory. Highlight this by marking
the corresponding variables as 'const'.
While at it also change the
The stripped purgatory does not contain a symtab. So when looking for
symbols this is done in read-only kexec_purgatory. Highlight this by
marking the corresponding variables as 'const'.
Signed-off-by: Philipp Rudo
---
kernel/kexec_file.c | 38
For s390 new kernels are loaded to fixed addresses in memory before they
are booted. With the current code this is a problem as it assumes the
kernel will be loaded to an 'arbitrary' address. In particular,
kexec_locate_mem_hole searches for a large enough memory region and sets
the load address
It is not necessary to distinguish between different kernel
versions. Kernel commit 2d070eab2e82 merely reuses a previously
unused bit (see clarification in kernel commit def9b71ee651a). The
bit was always zero even before that commit, so it is safe to mask
it off even for kernel versions before
22 matches
Mail list logo