linux/include/linux/coredump.h
<<
>>
Prefs
   1/* SPDX-License-Identifier: GPL-2.0 */
   2#ifndef _LINUX_COREDUMP_H
   3#define _LINUX_COREDUMP_H
   4
   5#include <linux/types.h>
   6#include <linux/mm.h>
   7#include <linux/fs.h>
   8#include <asm/siginfo.h>
   9
  10struct core_vma_metadata {
  11        unsigned long start, end;
  12        unsigned long flags;
  13        unsigned long dump_size;
  14};
  15
  16/*
  17 * These are the only things you should do on a core-file: use only these
  18 * functions to write out all the necessary info.
  19 */
  20struct coredump_params;
  21extern int dump_skip(struct coredump_params *cprm, size_t nr);
  22extern int dump_emit(struct coredump_params *cprm, const void *addr, int nr);
  23extern int dump_align(struct coredump_params *cprm, int align);
  24extern void dump_truncate(struct coredump_params *cprm);
  25int dump_user_range(struct coredump_params *cprm, unsigned long start,
  26                    unsigned long len);
  27int dump_vma_snapshot(struct coredump_params *cprm, int *vma_count,
  28                      struct core_vma_metadata **vma_meta,
  29                      size_t *vma_data_size_ptr);
  30#ifdef CONFIG_COREDUMP
  31extern void do_coredump(const kernel_siginfo_t *siginfo);
  32#else
  33static inline void do_coredump(const kernel_siginfo_t *siginfo) {}
  34#endif
  35
  36extern int core_uses_pid;
  37extern char core_pattern[];
  38extern unsigned int core_pipe_limit;
  39
  40#endif /* _LINUX_COREDUMP_H */
  41