[PATCH v5 3/7] kexec_elf: remove parsing of section headers

2019-08-23 Thread Sven Schnelle
We're not using them, so we can drop the parsing. Signed-off-by: Sven Schnelle Reviewed-by: Thiago Jung Bauermann --- include/linux/kexec.h | 1 - kernel/kexec_elf.c| 137 -- 2 files changed, 138 deletions(-) diff --git a/include/linux/kexec.h

[PATCH v5 4/7] kexec_elf: remove PURGATORY_STACK_SIZE

2019-08-23 Thread Sven Schnelle
It's not used anywhere so just drop it. Signed-off-by: Sven Schnelle Reviewed-by: Thiago Jung Bauermann --- kernel/kexec_elf.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/kernel/kexec_elf.c b/kernel/kexec_elf.c index 137037603117..87935bd5e2ba 100644 --- a/kernel/kexec_elf.c +++

[PATCH v5 0/7] kexec: add generic support for elf kernel images

2019-08-23 Thread Sven Schnelle
Changes to v4: - rebase on current powerpc/merge tree - fix syscall name in commit message - remove a few unused #defines in arch/powerpc/kernel/kexec_elf_64.c Changes to v3: - add support for 32-bit ELF files Changes to v2: - use git format-patch -C Changes to v1: - split up patch into

[PATCH v5 5/7] kexec_elf: remove Elf_Rel macro

2019-08-23 Thread Sven Schnelle
It wasn't used anywhere, so lets drop it. Reviewed-by: Christophe Leroy Reviewed-by: Thiago Jung Bauermann Signed-off-by: Sven Schnelle --- kernel/kexec_elf.c | 4 1 file changed, 4 deletions(-) diff --git a/kernel/kexec_elf.c b/kernel/kexec_elf.c index 87935bd5e2ba..6c806ce96ac1 100644

[PATCH v5 7/7] kexec_elf: support 32 bit ELF files

2019-08-23 Thread Sven Schnelle
The powerpc version only supported 64 bit. Add some code to switch decoding of fields during runtime so we can kexec a 32 bit kernel from a 64 bit kernel and vice versa. Signed-off-by: Sven Schnelle Reviewed-by: Thiago Jung Bauermann --- kernel/kexec_elf.c | 57

[PATCH v5 2/7] kexec_elf: change order of elf_*_to_cpu() functions

2019-08-23 Thread Sven Schnelle
Change the order to have a 64/32/16 order, no functional change. Signed-off-by: Sven Schnelle Reviewed-by: Thiago Jung Bauermann --- kernel/kexec_elf.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/kernel/kexec_elf.c b/kernel/kexec_elf.c index

[PATCH v5 6/7] kexec_elf: remove unused variable in kexec_elf_load()

2019-08-23 Thread Sven Schnelle
base was never assigned, so we can remove it. Reviewed-by: Christophe Leroy Reviewed-by: Thiago Jung Bauermann Signed-off-by: Sven Schnelle --- kernel/kexec_elf.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/kernel/kexec_elf.c b/kernel/kexec_elf.c index

[PATCH v5 1/7] kexec: add KEXEC_ELF

2019-08-23 Thread Sven Schnelle
Right now powerpc provides an implementation to read elf files with the kexec_file_load() syscall. Make that available as a public kexec interface so it can be re-used on other architectures. Signed-off-by: Sven Schnelle --- arch/Kconfig | 3 +

[PATCH 4/4 v2] Limit the size of vmcore-dmesg.txt to 2G

2019-08-23 Thread Lianbo Jiang
With some corrupted vmcore files, the vmcore-dmesg.txt file may grow forever till the kdump disk becomes full, and also probably causes the disk error messages as follow: ... sd 0:0:0:0: [sda] tag#6 FAILED Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK sd 0:0:0:0: [sda] tag#6 CDB: Read(10)

[PATCH 1/4 v2] Cleanup: remove the read_elf_kcore()

2019-08-23 Thread Lianbo Jiang
Here, no need to wrap the read_elf() again, lets invoke it directly. So remove the read_elf_kcore() and clean up redundant code. Signed-off-by: Lianbo Jiang --- kexec/arch/arm64/kexec-arm64.c | 2 +- util_lib/elf_info.c| 15 ++- util_lib/include/elf_info.h| 2 +- 3

[PATCH 0/4 v2] Limit the size of vmcore-dmesg.txt to 2G

2019-08-23 Thread Lianbo Jiang
[PATCH 1/4] Cleanup: remove the read_elf_kcore() Here, no need to wrap the read_elf() again, lets invoke it directly. So remove the read_elf_kcore() and clean up redundant code. [PATCH 2/4] Fix an error definition about the variable 'fname' The variable 'fname' is mistakenly defined two twice,

[PATCH 3/4 v2] Cleanup: move it back from util_lib/elf_info.c

2019-08-23 Thread Lianbo Jiang
Some code related to vmcore-dmesg.c is put into the util_lib, which is not very reasonable, so lets move it back and tidy up those code. In addition, that will also help to limit the size of vmcore-dmesg.txt in vmcore-dmesg.c instead of elf_info.c. Signed-off-by: Lianbo Jiang ---

[PATCH 2/4 v2] Fix an error definition about the variable 'fname'

2019-08-23 Thread Lianbo Jiang
The variable 'fname' is mistakenly defined two twice, the first definition is in the vmcore-dmesg.c, and the second definition is in the elf_info.c. That is confused and incorrect although it's a static type, because the value of variable 'fname' is not assigned(set) in elf_info.c. Anyway, its

Re: [PATCH 1/2] cleanup: move it back from util_lib/elf_info.c

2019-08-23 Thread lijiang
在 2019年08月23日 13:24, lijiang 写道: > 在 2019年08月22日 16:51, Simon Horman 写道: >> Hi Lianbo, >> >> I like where this patch is going but I would like to request a few changes. >> Please see comments inline. >> > > Thanks for your comment, Simon. > >> On Thu, Aug 15, 2019 at 11:37:55AM +0800, Lianbo