[systemd-devel] [PATCH v2 0/2] coredump: add journal fields useful for bug reporting

Jakub Filak jfilak at redhat.com
Mon Nov 24 22:37:46 PST 2014


'util: add functions getting proc status, maps, limits, cgroup'

  I dropped this patch, because we just need to read full proc file and
  'get_process_proc_file()' function is not implementable without adding a
  wrapper function to procfs_file_alloca() macro.

'util: add function getting proc environ'

  get_process_environ() function does not use unnecessary buffer, allocates 5
  more bytes in each loop cycle and writes escaped bytes directly to the
  result memory.

'coredump: collect all /proc data useful for bug reporting'

  compose_open_fds() function uses open_memstream() and tries to open only
  existing files in /proc/[pid]/fd/

  limits, status, maps and cgroups files are obtained by calling read_full_file
  with path returned by procfs_file_alloca().

I tested these patches on Fedora Rawhide.

Jakub Filak (2):
  util: add function getting proc environ
  coredump: collect all /proc data useful for bug reporting

 src/journal/coredump.c | 156 ++++++++++++++++++++++++++++++++++++++++++++++++-
 src/shared/util.c      | 154 ++++++++++++++++++++++++++++++------------------
 src/shared/util.h      |   1 +
 src/test/test-util.c   |   5 ++
 4 files changed, 257 insertions(+), 59 deletions(-)

-- 
1.8.3.1



More information about the systemd-devel mailing list