1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _LINUX_COREDUMP_H
3 #define _LINUX_COREDUMP_H
5 #include <linux/types.h>
8 #include <asm/siginfo.h>
10 struct core_vma_metadata {
11 unsigned long start, end;
13 unsigned long dump_size;
19 * These are the only things you should do on a core-file: use only these
20 * functions to write out all the necessary info.
22 struct coredump_params;
23 extern int dump_skip(struct coredump_params *cprm, size_t nr);
24 extern int dump_emit(struct coredump_params *cprm, const void *addr, int nr);
25 extern int dump_align(struct coredump_params *cprm, int align);
26 extern void dump_truncate(struct coredump_params *cprm);
27 int dump_user_range(struct coredump_params *cprm, unsigned long start,
29 #ifdef CONFIG_COREDUMP
30 extern void do_coredump(const kernel_siginfo_t *siginfo);
32 static inline void do_coredump(const kernel_siginfo_t *siginfo) {}
35 extern int core_uses_pid;
36 extern char core_pattern[];
37 extern unsigned int core_pipe_limit;
39 #endif /* _LINUX_COREDUMP_H */