@@ -762,8 +762,7 @@ static int parse_elf_property(const char *data, size_t *off, size_t datasz,
762762}
763763
764764#define NOTE_DATA_SZ SZ_1K
765- #define GNU_PROPERTY_TYPE_0_NAME "GNU"
766- #define NOTE_NAME_SZ (sizeof(GNU_PROPERTY_TYPE_0_NAME))
765+ #define NOTE_NAME_SZ (sizeof(NN_GNU_PROPERTY_TYPE_0))
767766
768767static int parse_elf_properties (struct file * f , const struct elf_phdr * phdr ,
769768 struct arch_elf_state * arch )
@@ -800,7 +799,7 @@ static int parse_elf_properties(struct file *f, const struct elf_phdr *phdr,
800799 if (note .nhdr .n_type != NT_GNU_PROPERTY_TYPE_0 ||
801800 note .nhdr .n_namesz != NOTE_NAME_SZ ||
802801 strncmp (note .data + sizeof (note .nhdr ),
803- GNU_PROPERTY_TYPE_0_NAME , n - sizeof (note .nhdr )))
802+ NN_GNU_PROPERTY_TYPE_0 , n - sizeof (note .nhdr )))
804803 return - ENOEXEC ;
805804
806805 off = round_up (sizeof (note .nhdr ) + NOTE_NAME_SZ ,
@@ -1603,14 +1602,14 @@ static void fill_auxv_note(struct memelfnote *note, struct mm_struct *mm)
16031602 do
16041603 i += 2 ;
16051604 while (auxv [i - 2 ] != AT_NULL );
1606- fill_note (note , "CORE" , NT_AUXV , i * sizeof (elf_addr_t ), auxv );
1605+ fill_note (note , NN_AUXV , NT_AUXV , i * sizeof (elf_addr_t ), auxv );
16071606}
16081607
16091608static void fill_siginfo_note (struct memelfnote * note , user_siginfo_t * csigdata ,
16101609 const kernel_siginfo_t * siginfo )
16111610{
16121611 copy_siginfo_to_external (csigdata , siginfo );
1613- fill_note (note , "CORE" , NT_SIGINFO , sizeof (* csigdata ), csigdata );
1612+ fill_note (note , NN_SIGINFO , NT_SIGINFO , sizeof (* csigdata ), csigdata );
16141613}
16151614
16161615/*
@@ -1706,7 +1705,7 @@ static int fill_files_note(struct memelfnote *note, struct coredump_params *cprm
17061705 }
17071706
17081707 size = name_curpos - (char * )data ;
1709- fill_note (note , "CORE" , NT_FILE , size , data );
1708+ fill_note (note , NN_FILE , NT_FILE , size , data );
17101709 return 0 ;
17111710}
17121711
@@ -1767,7 +1766,7 @@ static int fill_thread_core_info(struct elf_thread_core_info *t,
17671766 regset_get (t -> task , & view -> regsets [0 ],
17681767 sizeof (t -> prstatus .pr_reg ), & t -> prstatus .pr_reg );
17691768
1770- fill_note (& t -> notes [0 ], "CORE" , NT_PRSTATUS ,
1769+ fill_note (& t -> notes [0 ], NN_PRSTATUS , NT_PRSTATUS ,
17711770 PRSTATUS_SIZE , & t -> prstatus );
17721771 info -> size += notesize (& t -> notes [0 ]);
17731772
@@ -1801,7 +1800,7 @@ static int fill_thread_core_info(struct elf_thread_core_info *t,
18011800 if (is_fpreg )
18021801 SET_PR_FPVALID (& t -> prstatus );
18031802
1804- fill_note (& t -> notes [note_iter ], is_fpreg ? "CORE" : "LINUX" ,
1803+ fill_note (& t -> notes [note_iter ], is_fpreg ? NN_PRFPREG : "LINUX" ,
18051804 note_type , ret , data );
18061805
18071806 info -> size += notesize (& t -> notes [note_iter ]);
@@ -1821,7 +1820,7 @@ static int fill_thread_core_info(struct elf_thread_core_info *t,
18211820 fill_prstatus (& t -> prstatus .common , p , signr );
18221821 elf_core_copy_task_regs (p , & t -> prstatus .pr_reg );
18231822
1824- fill_note (& t -> notes [0 ], "CORE" , NT_PRSTATUS , sizeof (t -> prstatus ),
1823+ fill_note (& t -> notes [0 ], NN_PRSTATUS , NT_PRSTATUS , sizeof (t -> prstatus ),
18251824 & (t -> prstatus ));
18261825 info -> size += notesize (& t -> notes [0 ]);
18271826
@@ -1832,7 +1831,7 @@ static int fill_thread_core_info(struct elf_thread_core_info *t,
18321831 }
18331832
18341833 t -> prstatus .pr_fpvalid = 1 ;
1835- fill_note (& t -> notes [1 ], "CORE" , NT_PRFPREG , sizeof (* fpu ), fpu );
1834+ fill_note (& t -> notes [1 ], NN_PRFPREG , NT_PRFPREG , sizeof (* fpu ), fpu );
18361835 info -> size += notesize (& t -> notes [1 ]);
18371836
18381837 return 1 ;
@@ -1852,7 +1851,7 @@ static int fill_note_info(struct elfhdr *elf, int phdrs,
18521851 psinfo = kmalloc (sizeof (* psinfo ), GFP_KERNEL );
18531852 if (!psinfo )
18541853 return 0 ;
1855- fill_note (& info -> psinfo , "CORE" , NT_PRPSINFO , sizeof (* psinfo ), psinfo );
1854+ fill_note (& info -> psinfo , NN_PRPSINFO , NT_PRPSINFO , sizeof (* psinfo ), psinfo );
18561855
18571856#ifdef CORE_DUMP_USE_REGSET
18581857 view = task_user_regset_view (dump_task );
0 commit comments