#define for_each_mte_vma(cprm, i, m) \ if (system_supports_mte()) \ for (i = 0, m = cprm->vma_meta; \
i < cprm->vma_count; \
i++, m = cprm->vma_meta + i) \ if (m->flags & VM_MTE)
/* * get_dump_page() returns NULL when encountering an empty * page table entry that would otherwise have been filled with * the zero page. Skip the equivalent tag dump which would * have been all zeros.
*/ if (!page) {
dump_skip(cprm, MTE_PAGE_TAG_STORAGE); continue;
}
/* * Pages mapped in user space as !pte_access_permitted() (e.g. * PROT_EXEC only) may not have the PG_mte_tagged flag set.
*/ if (!page_mte_tagged(page)) {
put_page(page);
dump_skip(cprm, MTE_PAGE_TAG_STORAGE); continue;
}
if (!tags) {
tags = mte_allocate_tag_storage(); if (!tags) {
put_page(page);
ret = 0; break;
}
}
mte_save_page_tags(page_address(page), tags);
put_page(page); if (!dump_emit(cprm, tags, MTE_PAGE_TAG_STORAGE)) {
ret = 0; break;
}
}
if (tags)
mte_free_tag_storage(tags);
return ret;
}
Elf_Half elf_core_extra_phdrs(struct coredump_params *cprm)
{ int i; struct core_vma_metadata *m; int vma_count = 0;
for_each_mte_vma(cprm, i, m)
vma_count++;
return vma_count;
}
int elf_core_write_extra_phdrs(struct coredump_params *cprm, loff_t offset)
{ int i; struct core_vma_metadata *m;
for_each_mte_vma(cprm, i, m) { struct elf_phdr phdr;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.