mbox series

[00/14] linux-user: Rewrite core dump

Message ID 20240227184833.193836-1-richard.henderson@linaro.org
Headers show
Series linux-user: Rewrite core dump | expand

Message

Richard Henderson Feb. 27, 2024, 6:48 p.m. UTC
This started simply to remove the two page[TARGET_PAGE_SIZE] instances.
These turn into variable length arrays, when I start to allow the page
size to vary for linux-user.

However, the first thing I noticed is that it is silly to write out
target memory to the corefile page by page.  As I started to clean
that up, I noticed some actual errors in the writing of notes.

Finally, we can stop creating local data structures to represent vmas
and rely on the ones over in user-exec.c.


r~


Richard Henderson (14):
  linux-user/elfload: Disable core dump if getrlimit fails
  linux-user/elfload: Merge init_note_info and fill_note_info
  linux-user/elfload: Tidy fill_note_info and struct elf_note_info
  linux-user/elfload: Stack allocate struct mm_struct
  linux-user/elfload: Latch errno before cleanup in elf_core_dump
  linux-user/elfload: Open core file after vma_init
  linux-user/elfload: Truncate core file on open
  linux-user/elfload: Lock cpu list and mmap during elf_core_dump
  linux-user/elfload: Size corefile before opening
  linux-user/elfload: Write corefile elf header in one block
  linux-user/elfload: Write process memory to core file in larger chunks
  linux-user/elfload: Simplify vma_dump_size
  linux-user/elfload: Rely on walk_memory_regions for vmas
  linux-user/elfload: Unprotect regions before core dump

 linux-user/elfload.c | 721 +++++++++++++------------------------------
 1 file changed, 221 insertions(+), 500 deletions(-)