|
34 | 34 | #include <asm/sections.h>
|
35 | 35 | #include "internal.h"
|
36 | 36 |
|
37 |
| -#define CORE_STR "CORE" |
38 |
| - |
39 | 37 | #ifndef ELF_CORE_EFLAGS
|
40 | 38 | #define ELF_CORE_EFLAGS 0
|
41 | 39 | #endif
|
@@ -122,7 +120,9 @@ static void update_kcore_size(void)
|
122 | 120 |
|
123 | 121 | kcore_phdrs_len = kcore_nphdr * sizeof(struct elf_phdr);
|
124 | 122 | kcore_notes_len = (4 * sizeof(struct elf_note) +
|
125 |
| - 3 * ALIGN(sizeof(CORE_STR), 4) + |
| 123 | + ALIGN(sizeof(NN_PRSTATUS), 4) + |
| 124 | + ALIGN(sizeof(NN_PRPSINFO), 4) + |
| 125 | + ALIGN(sizeof(NN_TASKSTRUCT), 4) + |
126 | 126 | VMCOREINFO_NOTE_NAME_BYTES +
|
127 | 127 | ALIGN(sizeof(struct elf_prstatus), 4) +
|
128 | 128 | ALIGN(sizeof(struct elf_prpsinfo), 4) +
|
@@ -443,11 +443,11 @@ static ssize_t read_kcore_iter(struct kiocb *iocb, struct iov_iter *iter)
|
443 | 443 | goto out;
|
444 | 444 | }
|
445 | 445 |
|
446 |
| - append_kcore_note(notes, &i, CORE_STR, NT_PRSTATUS, &prstatus, |
| 446 | + append_kcore_note(notes, &i, NN_PRSTATUS, NT_PRSTATUS, &prstatus, |
447 | 447 | sizeof(prstatus));
|
448 |
| - append_kcore_note(notes, &i, CORE_STR, NT_PRPSINFO, &prpsinfo, |
| 448 | + append_kcore_note(notes, &i, NN_PRPSINFO, NT_PRPSINFO, &prpsinfo, |
449 | 449 | sizeof(prpsinfo));
|
450 |
| - append_kcore_note(notes, &i, CORE_STR, NT_TASKSTRUCT, current, |
| 450 | + append_kcore_note(notes, &i, NN_TASKSTRUCT, NT_TASKSTRUCT, current, |
451 | 451 | arch_task_struct_size);
|
452 | 452 | /*
|
453 | 453 | * vmcoreinfo_size is mostly constant after init time, but it
|
|
0 commit comments