blob: 207aed96a5b7dd7dcc7b74df34ec512558738ac5 [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
Daisuke HATAYAMA088e7af2010-03-05 13:44:06 -08002#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>
Richard Weinberger1d46e232012-10-19 13:56:47 -07008#include <asm/siginfo.h>
Daisuke HATAYAMA088e7af2010-03-05 13:44:06 -08009
10/*
11 * These are the only things you should do on a core-file: use only these
12 * functions to write out all the necessary info.
13 */
Al Viroecc8c772013-10-05 15:32:35 -040014struct coredump_params;
Al Viro9b56d542013-10-08 09:26:08 -040015extern int dump_skip(struct coredump_params *cprm, size_t nr);
Al Viroecc8c772013-10-05 15:32:35 -040016extern int dump_emit(struct coredump_params *cprm, const void *addr, int nr);
Al Viro22a8cb82013-10-08 11:05:01 -040017extern int dump_align(struct coredump_params *cprm, int align);
Dave Kleikamp4d22c752017-01-11 13:25:00 -060018extern void dump_truncate(struct coredump_params *cprm);
Alex Kelly179899f2012-10-04 17:15:24 -070019#ifdef CONFIG_COREDUMP
Al Viroec579412013-10-13 17:57:29 -040020extern void do_coredump(const siginfo_t *siginfo);
Alex Kelly179899f2012-10-04 17:15:24 -070021#else
Al Viroec579412013-10-13 17:57:29 -040022static inline void do_coredump(const siginfo_t *siginfo) {}
Alex Kelly179899f2012-10-04 17:15:24 -070023#endif
Daisuke HATAYAMA088e7af2010-03-05 13:44:06 -080024
25#endif /* _LINUX_COREDUMP_H */