Skip to content

Commit 609c8b3

Browse files
akihikodakikees
authored andcommitted
powerpc/crash: Use note name macros
Use note name macros to match with the userspace's expectation. Signed-off-by: Akihiko Odaki <[email protected]> Acked-by: Baoquan He <[email protected]> Reviewed-by: Dave Martin <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Kees Cook <[email protected]>
1 parent 2fc4947 commit 609c8b3

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

arch/powerpc/kernel/fadump.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -751,7 +751,7 @@ u32 *__init fadump_regs_to_elf_notes(u32 *buf, struct pt_regs *regs)
751751
* prstatus.pr_pid = ????
752752
*/
753753
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,
755755
&prstatus, sizeof(prstatus));
756756
return buf;
757757
}

arch/powerpc/platforms/powernv/opal-core.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ static Elf64_Word *__init auxv_to_elf64_notes(Elf64_Word *buf,
149149
/* end of vector */
150150
bufp[idx++] = cpu_to_be64(AT_NULL);
151151

152-
buf = append_elf64_note(buf, CRASH_CORE_NOTE_NAME, NT_AUXV,
152+
buf = append_elf64_note(buf, NN_AUXV, NT_AUXV,
153153
oc_conf->auxv_buf, AUXV_DESC_SZ);
154154
return buf;
155155
}
@@ -252,7 +252,7 @@ static Elf64_Word * __init opalcore_append_cpu_notes(Elf64_Word *buf)
252252
* crashing CPU's prstatus.
253253
*/
254254
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,
256256
&prstatus, sizeof(prstatus));
257257

258258
for (i = 0; i < oc_conf->num_cpus; i++, bufp += size_per_thread) {
@@ -279,15 +279,15 @@ static Elf64_Word * __init opalcore_append_cpu_notes(Elf64_Word *buf)
279279
fill_prstatus(&prstatus, thread_pir, &regs);
280280

281281
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,
283283
NT_PRSTATUS, &prstatus,
284284
sizeof(prstatus));
285285
} else {
286286
/*
287287
* Add crashing CPU as the first NT_PRSTATUS note for
288288
* GDB to process the core file appropriately.
289289
*/
290-
append_elf64_note(first_cpu_note, CRASH_CORE_NOTE_NAME,
290+
append_elf64_note(first_cpu_note, NN_PRSTATUS,
291291
NT_PRSTATUS, &prstatus,
292292
sizeof(prstatus));
293293
}

0 commit comments

Comments
 (0)