@@ -762,8 +762,7 @@ static int parse_elf_property(const char *data, size_t *off, size_t datasz,
762
762
}
763
763
764
764
#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))
767
766
768
767
static int parse_elf_properties (struct file * f , const struct elf_phdr * phdr ,
769
768
struct arch_elf_state * arch )
@@ -800,7 +799,7 @@ static int parse_elf_properties(struct file *f, const struct elf_phdr *phdr,
800
799
if (note .nhdr .n_type != NT_GNU_PROPERTY_TYPE_0 ||
801
800
note .nhdr .n_namesz != NOTE_NAME_SZ ||
802
801
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 )))
804
803
return - ENOEXEC ;
805
804
806
805
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)
1603
1602
do
1604
1603
i += 2 ;
1605
1604
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 );
1607
1606
}
1608
1607
1609
1608
static void fill_siginfo_note (struct memelfnote * note , user_siginfo_t * csigdata ,
1610
1609
const kernel_siginfo_t * siginfo )
1611
1610
{
1612
1611
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 );
1614
1613
}
1615
1614
1616
1615
/*
@@ -1706,7 +1705,7 @@ static int fill_files_note(struct memelfnote *note, struct coredump_params *cprm
1706
1705
}
1707
1706
1708
1707
size = name_curpos - (char * )data ;
1709
- fill_note (note , "CORE" , NT_FILE , size , data );
1708
+ fill_note (note , NN_FILE , NT_FILE , size , data );
1710
1709
return 0 ;
1711
1710
}
1712
1711
@@ -1767,7 +1766,7 @@ static int fill_thread_core_info(struct elf_thread_core_info *t,
1767
1766
regset_get (t -> task , & view -> regsets [0 ],
1768
1767
sizeof (t -> prstatus .pr_reg ), & t -> prstatus .pr_reg );
1769
1768
1770
- fill_note (& t -> notes [0 ], "CORE" , NT_PRSTATUS ,
1769
+ fill_note (& t -> notes [0 ], NN_PRSTATUS , NT_PRSTATUS ,
1771
1770
PRSTATUS_SIZE , & t -> prstatus );
1772
1771
info -> size += notesize (& t -> notes [0 ]);
1773
1772
@@ -1801,7 +1800,7 @@ static int fill_thread_core_info(struct elf_thread_core_info *t,
1801
1800
if (is_fpreg )
1802
1801
SET_PR_FPVALID (& t -> prstatus );
1803
1802
1804
- fill_note (& t -> notes [note_iter ], is_fpreg ? "CORE" : "LINUX" ,
1803
+ fill_note (& t -> notes [note_iter ], is_fpreg ? NN_PRFPREG : "LINUX" ,
1805
1804
note_type , ret , data );
1806
1805
1807
1806
info -> size += notesize (& t -> notes [note_iter ]);
@@ -1821,7 +1820,7 @@ static int fill_thread_core_info(struct elf_thread_core_info *t,
1821
1820
fill_prstatus (& t -> prstatus .common , p , signr );
1822
1821
elf_core_copy_task_regs (p , & t -> prstatus .pr_reg );
1823
1822
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 ),
1825
1824
& (t -> prstatus ));
1826
1825
info -> size += notesize (& t -> notes [0 ]);
1827
1826
@@ -1832,7 +1831,7 @@ static int fill_thread_core_info(struct elf_thread_core_info *t,
1832
1831
}
1833
1832
1834
1833
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 );
1836
1835
info -> size += notesize (& t -> notes [1 ]);
1837
1836
1838
1837
return 1 ;
@@ -1852,7 +1851,7 @@ static int fill_note_info(struct elfhdr *elf, int phdrs,
1852
1851
psinfo = kmalloc (sizeof (* psinfo ), GFP_KERNEL );
1853
1852
if (!psinfo )
1854
1853
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 );
1856
1855
1857
1856
#ifdef CORE_DUMP_USE_REGSET
1858
1857
view = task_user_regset_view (dump_task );
0 commit comments