Lines Matching refs:info
1525 struct elf_note_info *info, in fill_note_info() argument
1535 info->size = 0; in fill_note_info()
1536 info->thread = NULL; in fill_note_info()
1539 fill_note(&info->psinfo, "CORE", NT_PRPSINFO, sizeof(*psinfo), psinfo); in fill_note_info()
1547 info->thread_notes = 0; in fill_note_info()
1550 ++info->thread_notes; in fill_note_info()
1556 if (unlikely(info->thread_notes == 0) || in fill_note_info()
1573 notes[info->thread_notes]), in fill_note_info()
1579 if (ct->task == dump_task || !info->thread) { in fill_note_info()
1580 t->next = info->thread; in fill_note_info()
1581 info->thread = t; in fill_note_info()
1587 t->next = info->thread->next; in fill_note_info()
1588 info->thread->next = t; in fill_note_info()
1595 for (t = info->thread; t != NULL; t = t->next) in fill_note_info()
1596 if (!fill_thread_core_info(t, view, signr, &info->size)) in fill_note_info()
1603 info->size += notesize(&info->psinfo); in fill_note_info()
1605 fill_auxv_note(&info->auxv, current->mm); in fill_note_info()
1606 info->size += notesize(&info->auxv); in fill_note_info()
1611 static size_t get_note_info_size(struct elf_note_info *info) in get_note_info_size() argument
1613 return info->size; in get_note_info_size()
1620 static int write_note_info(struct elf_note_info *info, in write_note_info() argument
1624 struct elf_thread_core_info *t = info->thread; in write_note_info()
1632 if (first && !writenote(&info->psinfo, file, foffset)) in write_note_info()
1634 if (first && !writenote(&info->auxv, file, foffset)) in write_note_info()
1637 for (i = 1; i < info->thread_notes; ++i) in write_note_info()
1649 static void free_note_info(struct elf_note_info *info) in free_note_info() argument
1651 struct elf_thread_core_info *threads = info->thread; in free_note_info()
1657 for (i = 1; i < info->thread_notes; ++i) in free_note_info()
1661 kfree(info->psinfo.data); in free_note_info()
1732 struct elf_note_info *info, in fill_note_info() argument
1738 info->notes = NULL; in fill_note_info()
1739 info->prstatus = NULL; in fill_note_info()
1740 info->psinfo = NULL; in fill_note_info()
1741 info->fpu = NULL; in fill_note_info()
1743 info->xfpu = NULL; in fill_note_info()
1745 INIT_LIST_HEAD(&info->thread_list); in fill_note_info()
1747 info->notes = kmalloc(NUM_NOTES * sizeof(struct memelfnote), in fill_note_info()
1749 if (!info->notes) in fill_note_info()
1751 info->psinfo = kmalloc(sizeof(*info->psinfo), GFP_KERNEL); in fill_note_info()
1752 if (!info->psinfo) in fill_note_info()
1754 info->prstatus = kmalloc(sizeof(*info->prstatus), GFP_KERNEL); in fill_note_info()
1755 if (!info->prstatus) in fill_note_info()
1757 info->fpu = kmalloc(sizeof(*info->fpu), GFP_KERNEL); in fill_note_info()
1758 if (!info->fpu) in fill_note_info()
1761 info->xfpu = kmalloc(sizeof(*info->xfpu), GFP_KERNEL); in fill_note_info()
1762 if (!info->xfpu) in fill_note_info()
1766 info->thread_status_size = 0; in fill_note_info()
1778 list_add(&ets->list, &info->thread_list); in fill_note_info()
1781 list_for_each(t, &info->thread_list) { in fill_note_info()
1786 info->thread_status_size += sz; in fill_note_info()
1790 memset(info->prstatus, 0, sizeof(*info->prstatus)); in fill_note_info()
1791 fill_prstatus(info->prstatus, current, signr); in fill_note_info()
1792 elf_core_copy_regs(&info->prstatus->pr_reg, regs); in fill_note_info()
1802 fill_note(info->notes + 0, "CORE", NT_PRSTATUS, in fill_note_info()
1803 sizeof(*info->prstatus), info->prstatus); in fill_note_info()
1804 fill_psinfo(info->psinfo, current->group_leader, current->mm); in fill_note_info()
1805 fill_note(info->notes + 1, "CORE", NT_PRPSINFO, in fill_note_info()
1806 sizeof(*info->psinfo), info->psinfo); in fill_note_info()
1808 info->numnote = 2; in fill_note_info()
1810 fill_auxv_note(&info->notes[info->numnote++], current->mm); in fill_note_info()
1813 info->prstatus->pr_fpvalid = elf_core_copy_task_fpregs(current, regs, in fill_note_info()
1814 info->fpu); in fill_note_info()
1815 if (info->prstatus->pr_fpvalid) in fill_note_info()
1816 fill_note(info->notes + info->numnote++, in fill_note_info()
1817 "CORE", NT_PRFPREG, sizeof(*info->fpu), info->fpu); in fill_note_info()
1819 if (elf_core_copy_task_xfpregs(current, info->xfpu)) in fill_note_info()
1820 fill_note(info->notes + info->numnote++, in fill_note_info()
1822 sizeof(*info->xfpu), info->xfpu); in fill_note_info()
1830 static size_t get_note_info_size(struct elf_note_info *info) in get_note_info_size() argument
1835 for (i = 0; i < info->numnote; i++) in get_note_info_size()
1836 sz += notesize(info->notes + i); in get_note_info_size()
1838 sz += info->thread_status_size; in get_note_info_size()
1843 static int write_note_info(struct elf_note_info *info, in write_note_info() argument
1849 for (i = 0; i < info->numnote; i++) in write_note_info()
1850 if (!writenote(info->notes + i, file, foffset)) in write_note_info()
1854 list_for_each(t, &info->thread_list) { in write_note_info()
1866 static void free_note_info(struct elf_note_info *info) in free_note_info() argument
1868 while (!list_empty(&info->thread_list)) { in free_note_info()
1869 struct list_head *tmp = info->thread_list.next; in free_note_info()
1874 kfree(info->prstatus); in free_note_info()
1875 kfree(info->psinfo); in free_note_info()
1876 kfree(info->notes); in free_note_info()
1877 kfree(info->fpu); in free_note_info()
1879 kfree(info->xfpu); in free_note_info()
1928 struct elf_note_info info; in elf_core_dump() local
1961 &info, signr, regs)) in elf_core_dump()
1978 size_t sz = get_note_info_size(&info); in elf_core_dump()
2023 if (!write_note_info(&info, file, &foffset)) in elf_core_dump()
2079 free_note_info(&info); in elf_core_dump()