Re: [PATCH v2 2/2] x86: kexec_file: print appropriate variable

From: Lukasz Stelmach
Date: Tue Oct 13 2020 - 16:17:36 EST


It was <2020-04-30 czw 18:31>, when Łukasz Stelmach wrote:
> The value of kbuf->memsz may be different than kbuf->bufsz after calling
> kexec_add_buffer(). Hence both values should be logged.
>
> Fixes: ec2b9bfaac44e ("kexec_file: Change kexec_add_buffer to take kexec_buf as argument.")
> Fixes: 27f48d3e633be ("kexec-bzImage64: support for loading bzImage using 64bit entry")
> Fixes: dd5f726076cc7 ("kexec: support for kexec on panic using new system call")
> Cc: Vivek Goyal <vgoyal@xxxxxxxxxx>
> Cc: Thiago Jung Bauermann <bauerman@xxxxxxxxxxxxxxxxxx>
> Signed-off-by: Łukasz Stelmach <l.stelmach@xxxxxxxxxxx>
> ---
> arch/x86/kernel/crash.c | 2 +-
> arch/x86/kernel/kexec-bzimage64.c | 4 ++--
> 2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/arch/x86/kernel/crash.c b/arch/x86/kernel/crash.c
> index fd87b59452a3..d408e5b536fa 100644
> --- a/arch/x86/kernel/crash.c
> +++ b/arch/x86/kernel/crash.c
> @@ -420,7 +420,7 @@ int crash_load_segments(struct kimage *image)
> }
> image->arch.elf_load_addr = kbuf.mem;
> pr_debug("Loaded ELF headers at 0x%lx bufsz=0x%lx memsz=0x%lx\n",
> - image->arch.elf_load_addr, kbuf.bufsz, kbuf.bufsz);
> + image->arch.elf_load_addr, kbuf.bufsz, kbuf.memsz);
>
> return ret;
> }
> diff --git a/arch/x86/kernel/kexec-bzimage64.c b/arch/x86/kernel/kexec-bzimage64.c
> index db6578d45157..420393c58a73 100644
> --- a/arch/x86/kernel/kexec-bzimage64.c
> +++ b/arch/x86/kernel/kexec-bzimage64.c
> @@ -434,7 +434,7 @@ static void *bzImage64_load(struct kimage *image, char *kernel,
> goto out_free_params;
> bootparam_load_addr = kbuf.mem;
> pr_debug("Loaded boot_param, command line and misc at 0x%lx bufsz=0x%lx memsz=0x%lx\n",
> - bootparam_load_addr, kbuf.bufsz, kbuf.bufsz);
> + bootparam_load_addr, kbuf.bufsz, kbuf.memsz);
>
> /* Load kernel */
> kbuf.buffer = kernel + kern16_size;
> @@ -464,7 +464,7 @@ static void *bzImage64_load(struct kimage *image, char *kernel,
> initrd_load_addr = kbuf.mem;
>
> pr_debug("Loaded initrd at 0x%lx bufsz=0x%lx memsz=0x%lx\n",
> - initrd_load_addr, initrd_len, initrd_len);
> + initrd_load_addr, kbuf.bufsz, kbuf.memsz);
>
> setup_initrd(params, initrd_load_addr, initrd_len);
> }

Ping? Any chance this patch follows its arm64 counterpart into mainline?

Kind regards,
--
Łukasz Stelmach
Samsung R&D Institute Poland
Samsung Electronics

Attachment: signature.asc
Description: PGP signature