]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blame - include/linux/coredump.h
nfs: don't atempt blocking locks on nfs reexports
[mirror_ubuntu-jammy-kernel.git] / include / linux / coredump.h
CommitLineData
b2441318 1/* SPDX-License-Identifier: GPL-2.0 */
088e7af7
DH
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>
1d46e232 8#include <asm/siginfo.h>
088e7af7 9
a64b8908 10#ifdef CONFIG_COREDUMP
a07279c9
JH
11struct core_vma_metadata {
12 unsigned long start, end;
13 unsigned long flags;
14 unsigned long dump_size;
15};
16
a64b8908
AV
17extern int core_uses_pid;
18extern char core_pattern[];
19extern unsigned int core_pipe_limit;
20
088e7af7
DH
21/*
22 * These are the only things you should do on a core-file: use only these
23 * functions to write out all the necessary info.
24 */
ecc8c772 25struct coredump_params;
d0f1088b
AV
26extern void dump_skip_to(struct coredump_params *cprm, unsigned long to);
27extern void dump_skip(struct coredump_params *cprm, size_t nr);
ecc8c772 28extern int dump_emit(struct coredump_params *cprm, const void *addr, int nr);
22a8cb82 29extern int dump_align(struct coredump_params *cprm, int align);
afc63a97
JH
30int dump_user_range(struct coredump_params *cprm, unsigned long start,
31 unsigned long len);
a07279c9
JH
32int dump_vma_snapshot(struct coredump_params *cprm, int *vma_count,
33 struct core_vma_metadata **vma_meta,
34 size_t *vma_data_size_ptr);
ae7795bc 35extern void do_coredump(const kernel_siginfo_t *siginfo);
179899fd 36#else
ae7795bc 37static inline void do_coredump(const kernel_siginfo_t *siginfo) {}
179899fd 38#endif
088e7af7
DH
39
40#endif /* _LINUX_COREDUMP_H */