Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

powerpc/crash: Use note name macros

Use note name macros to match with the userspace's expectation.

Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Acked-by: Baoquan He <bhe@redhat.com>
Reviewed-by: Dave Martin <Dave.Martin@arm.com>
Link: https://lore.kernel.org/r/20250115-elf-v5-3-0f9e55bbb2fc@daynix.com
Signed-off-by: Kees Cook <kees@kernel.org>

authored by

Akihiko Odaki and committed by
Kees Cook
609c8b30 2fc4947b

+5 -5
+1 -1
arch/powerpc/kernel/fadump.c
··· 751 751 * prstatus.pr_pid = ???? 752 752 */ 753 753 elf_core_copy_regs(&prstatus.pr_reg, regs); 754 - buf = append_elf_note(buf, CRASH_CORE_NOTE_NAME, NT_PRSTATUS, 754 + buf = append_elf_note(buf, NN_PRSTATUS, NT_PRSTATUS, 755 755 &prstatus, sizeof(prstatus)); 756 756 return buf; 757 757 }
+4 -4
arch/powerpc/platforms/powernv/opal-core.c
··· 149 149 /* end of vector */ 150 150 bufp[idx++] = cpu_to_be64(AT_NULL); 151 151 152 - buf = append_elf64_note(buf, CRASH_CORE_NOTE_NAME, NT_AUXV, 152 + buf = append_elf64_note(buf, NN_AUXV, NT_AUXV, 153 153 oc_conf->auxv_buf, AUXV_DESC_SZ); 154 154 return buf; 155 155 } ··· 252 252 * crashing CPU's prstatus. 253 253 */ 254 254 first_cpu_note = buf; 255 - buf = append_elf64_note(buf, CRASH_CORE_NOTE_NAME, NT_PRSTATUS, 255 + buf = append_elf64_note(buf, NN_PRSTATUS, NT_PRSTATUS, 256 256 &prstatus, sizeof(prstatus)); 257 257 258 258 for (i = 0; i < oc_conf->num_cpus; i++, bufp += size_per_thread) { ··· 279 279 fill_prstatus(&prstatus, thread_pir, &regs); 280 280 281 281 if (thread_pir != oc_conf->crashing_cpu) { 282 - buf = append_elf64_note(buf, CRASH_CORE_NOTE_NAME, 282 + buf = append_elf64_note(buf, NN_PRSTATUS, 283 283 NT_PRSTATUS, &prstatus, 284 284 sizeof(prstatus)); 285 285 } else { ··· 287 287 * Add crashing CPU as the first NT_PRSTATUS note for 288 288 * GDB to process the core file appropriately. 289 289 */ 290 - append_elf64_note(first_cpu_note, CRASH_CORE_NOTE_NAME, 290 + append_elf64_note(first_cpu_note, NN_PRSTATUS, 291 291 NT_PRSTATUS, &prstatus, 292 292 sizeof(prstatus)); 293 293 }