Skip to content

Commit a99a3e2

Browse files
committed
coredump: Move definition of struct coredump_params into coredump.h
Move the definition of struct coredump_params into coredump.h where it belongs. Remove the slightly errorneous comment explaining why struct coredump_params was declared in binfmts.h. Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
1 parent 9e1a3ce commit a99a3e2

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

fs/binfmt_flat.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
#include <linux/flat.h>
3838
#include <linux/uaccess.h>
3939
#include <linux/vmalloc.h>
40+
#include <linux/coredump.h>
4041

4142
#include <asm/byteorder.h>
4243
#include <asm/unaligned.h>

include/linux/binfmts.h

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#include <uapi/linux/binfmts.h>
99

1010
struct filename;
11+
struct coredump_params;
1112

1213
#define CORENAME_MAX_SIZE 128
1314

@@ -77,18 +78,6 @@ struct linux_binprm {
7778
#define BINPRM_FLAGS_PRESERVE_ARGV0_BIT 3
7879
#define BINPRM_FLAGS_PRESERVE_ARGV0 (1 << BINPRM_FLAGS_PRESERVE_ARGV0_BIT)
7980

80-
/* Function parameter for binfmt->coredump */
81-
struct coredump_params {
82-
const kernel_siginfo_t *siginfo;
83-
struct pt_regs *regs;
84-
struct file *file;
85-
unsigned long limit;
86-
unsigned long mm_flags;
87-
loff_t written;
88-
loff_t pos;
89-
loff_t to_skip;
90-
};
91-
9281
/*
9382
* This structure defines the functions that are used to load the binary formats that
9483
* linux accepts.

include/linux/coredump.h

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,21 @@ struct core_vma_metadata {
1414
unsigned long dump_size;
1515
};
1616

17+
struct coredump_params {
18+
const kernel_siginfo_t *siginfo;
19+
struct pt_regs *regs;
20+
struct file *file;
21+
unsigned long limit;
22+
unsigned long mm_flags;
23+
loff_t written;
24+
loff_t pos;
25+
loff_t to_skip;
26+
};
27+
1728
/*
1829
* These are the only things you should do on a core-file: use only these
1930
* functions to write out all the necessary info.
2031
*/
21-
struct coredump_params;
2232
extern void dump_skip_to(struct coredump_params *cprm, unsigned long to);
2333
extern void dump_skip(struct coredump_params *cprm, size_t nr);
2434
extern int dump_emit(struct coredump_params *cprm, const void *addr, int nr);

0 commit comments

Comments
 (0)