[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200430163142.27282-3-l.stelmach@samsung.com>
Date: Thu, 30 Apr 2020 18:31:42 +0200
From: Łukasz Stelmach <l.stelmach@...sung.com>
To: Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will.deacon@....com>,
Mark Rutland <mark.rutland@....com>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
x86@...nel.org, "H. Peter Anvin" <hpa@...or.com>,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Cc: Vivek Goyal <vgoyal@...hat.com>,
Thiago Jung Bauermann <bauerman@...ux.vnet.ibm.com>,
AKASHI Takahiro <takahiro.akashi@...aro.org>,
James Morse <james.morse@....com>,
Bhupesh Sharma <bhsharma@...hat.com>,
Łukasz Stelmach <l.stelmach@...sung.com>
Subject: [PATCH v2 2/2] x86: kexec_file: print appropriate variable
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@...hat.com>
Cc: Thiago Jung Bauermann <bauerman@...ux.vnet.ibm.com>
Signed-off-by: Łukasz Stelmach <l.stelmach@...sung.com>
---
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);
}
--
2.25.0
Powered by blists - more mailing lists