aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds2021-04-27 11:04:27 -0700
committerLinus Torvalds2021-04-27 11:04:27 -0700
commit5e6720888523eaac7c548df0d263739c56a3c22e (patch)
tree65b88558a0fb09cf2eedd0592766fb00666bf721 /include
parentd1466bc583a81830cef2399a4b8a514398351b40 (diff)
parenta64b89088bb1413bb84424f0b16a4d1f9bb0e947 (diff)
Merge branch 'work.coredump' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull coredump updates from Al Viro: "Just a couple of patches this cycle: use of seek + write instead of expanding truncate and minor header cleanup" * 'work.coredump' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: coredump.h: move CONFIG_COREDUMP-only stuff inside the ifdef coredump: don't bother with do_truncate()
Diffstat (limited to 'include')
-rw-r--r--include/linux/binfmts.h1
-rw-r--r--include/linux/coredump.h14
2 files changed, 8 insertions, 7 deletions
diff --git a/include/linux/binfmts.h b/include/linux/binfmts.h
index 0abd93efc181..049cf9421d83 100644
--- a/include/linux/binfmts.h
+++ b/include/linux/binfmts.h
@@ -86,6 +86,7 @@ struct coredump_params {
unsigned long mm_flags;
loff_t written;
loff_t pos;
+ loff_t to_skip;
};
/*
diff --git a/include/linux/coredump.h b/include/linux/coredump.h
index e58e8c207782..78fcd776b185 100644
--- a/include/linux/coredump.h
+++ b/include/linux/coredump.h
@@ -7,34 +7,34 @@
#include <linux/fs.h>
#include <asm/siginfo.h>
+#ifdef CONFIG_COREDUMP
struct core_vma_metadata {
unsigned long start, end;
unsigned long flags;
unsigned long dump_size;
};
+extern int core_uses_pid;
+extern char core_pattern[];
+extern unsigned int core_pipe_limit;
+
/*
* These are the only things you should do on a core-file: use only these
* functions to write out all the necessary info.
*/
struct coredump_params;
-extern int dump_skip(struct coredump_params *cprm, size_t nr);
+extern void dump_skip_to(struct coredump_params *cprm, unsigned long to);
+extern void dump_skip(struct coredump_params *cprm, size_t nr);
extern int dump_emit(struct coredump_params *cprm, const void *addr, int nr);
extern int dump_align(struct coredump_params *cprm, int align);
-extern void dump_truncate(struct coredump_params *cprm);
int dump_user_range(struct coredump_params *cprm, unsigned long start,
unsigned long len);
int dump_vma_snapshot(struct coredump_params *cprm, int *vma_count,
struct core_vma_metadata **vma_meta,
size_t *vma_data_size_ptr);
-#ifdef CONFIG_COREDUMP
extern void do_coredump(const kernel_siginfo_t *siginfo);
#else
static inline void do_coredump(const kernel_siginfo_t *siginfo) {}
#endif
-extern int core_uses_pid;
-extern char core_pattern[];
-extern unsigned int core_pipe_limit;
-
#endif /* _LINUX_COREDUMP_H */