mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] riscv/kexec_file: Fix comment in purgatory relocator
@ 2025-03-26  7:34 Yao Zi
  2025-03-26 19:55 ` Björn Töpel
  2025-06-02 22:12 ` patchwork-bot+linux-riscv
  0 siblings, 2 replies; 3+ messages in thread
From: Yao Zi @ 2025-03-26  7:34 UTC (permalink / raw)
  To: Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti,
	Andrew Jones, Ying Sun, Arnd Bergmann, Yao Zi, Kent Overstreet,
	Li Zhengyu
  Cc: linux-riscv, linux-kernel

Apparently sec_base doesn't mean relocated symbol value, which seems a
copy-pasting error in the comment. Assigned with the address of section
indexed by sym->st_shndx, it should represent base address of the
relevant section. Let's fix the comment to avoid possible confusion.

Fixes: 838b3e28488f ("RISC-V: Load purgatory in kexec_file")
Signed-off-by: Yao Zi <ziyao@disroot.org>
---
 arch/riscv/kernel/elf_kexec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/riscv/kernel/elf_kexec.c b/arch/riscv/kernel/elf_kexec.c
index 3c37661801f9..9b8ff87630f6 100644
--- a/arch/riscv/kernel/elf_kexec.c
+++ b/arch/riscv/kernel/elf_kexec.c
@@ -390,7 +390,7 @@ int arch_kexec_apply_relocations_add(struct purgatory_info *pi,
 		const Elf_Sym *sym;	/* symbol to relocate */
 		unsigned long addr;	/* final location after relocation */
 		unsigned long val;	/* relocated symbol value */
-		unsigned long sec_base;	/* relocated symbol value */
+		unsigned long sec_base;	/* relocated section base address */
 		void *loc;		/* tmp location to modify */
 
 		sym = (void *)pi->ehdr + symtab->sh_offset;
-- 
2.49.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] riscv/kexec_file: Fix comment in purgatory relocator
  2025-03-26  7:34 [PATCH] riscv/kexec_file: Fix comment in purgatory relocator Yao Zi
@ 2025-03-26 19:55 ` Björn Töpel
  2025-06-02 22:12 ` patchwork-bot+linux-riscv
  1 sibling, 0 replies; 3+ messages in thread
From: Björn Töpel @ 2025-03-26 19:55 UTC (permalink / raw)
  To: Yao Zi, Paul Walmsley, Palmer Dabbelt, Albert Ou,
	Alexandre Ghiti, Andrew Jones, Ying Sun, Arnd Bergmann, Yao Zi,
	Kent Overstreet, Li Zhengyu
  Cc: linux-riscv, linux-kernel

Yao Zi <ziyao@disroot.org> writes:

> Apparently sec_base doesn't mean relocated symbol value, which seems a
> copy-pasting error in the comment. Assigned with the address of section
> indexed by sym->st_shndx, it should represent base address of the
> relevant section. Let's fix the comment to avoid possible confusion.
>
> Fixes: 838b3e28488f ("RISC-V: Load purgatory in kexec_file")
> Signed-off-by: Yao Zi <ziyao@disroot.org>

Reviewed-by: Björn Töpel <bjorn@rivosinc.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] riscv/kexec_file: Fix comment in purgatory relocator
  2025-03-26  7:34 [PATCH] riscv/kexec_file: Fix comment in purgatory relocator Yao Zi
  2025-03-26 19:55 ` Björn Töpel
@ 2025-06-02 22:12 ` patchwork-bot+linux-riscv
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+linux-riscv @ 2025-06-02 22:12 UTC (permalink / raw)
  To: Yao Zi
  Cc: linux-riscv, paul.walmsley, palmer, aou, alex, ajones, sunying,
	arnd, kent.overstreet, lizhengyu3, linux-kernel

Hello:

This patch was applied to riscv/linux.git (for-next)
by Alexandre Ghiti <alexghiti@rivosinc.com>:

On Wed, 26 Mar 2025 07:34:51 +0000 you wrote:
> Apparently sec_base doesn't mean relocated symbol value, which seems a
> copy-pasting error in the comment. Assigned with the address of section
> indexed by sym->st_shndx, it should represent base address of the
> relevant section. Let's fix the comment to avoid possible confusion.
> 
> Fixes: 838b3e28488f ("RISC-V: Load purgatory in kexec_file")
> Signed-off-by: Yao Zi <ziyao@disroot.org>
> 
> [...]

Here is the summary with links:
  - riscv/kexec_file: Fix comment in purgatory relocator
    https://git.kernel.org/riscv/c/0f6edcccfbd8

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-06-02 22:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-03-26  7:34 [PATCH] riscv/kexec_file: Fix comment in purgatory relocator Yao Zi
2025-03-26 19:55 ` Björn Töpel
2025-06-02 22:12 ` patchwork-bot+linux-riscv

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®