mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-04-01 11:54:10 +00:00
coredump: update coredump-related headers
Create a new header file, fs/coredump.h, which contains functions only used by the new coredump.c. It also moves do_coredump to the include/linux/coredump.h header file, for consistency. Signed-off-by: Alex Kelly <alex.page.kelly@gmail.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org> Acked-by: Serge Hallyn <serge.hallyn@canonical.com> Acked-by: Kees Cook <keescook@chromium.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
046d662f48
commit
179899fd5d
7 changed files with 15 additions and 6 deletions
|
@ -14,6 +14,7 @@
|
||||||
#include <linux/key.h>
|
#include <linux/key.h>
|
||||||
#include <linux/personality.h>
|
#include <linux/personality.h>
|
||||||
#include <linux/binfmts.h>
|
#include <linux/binfmts.h>
|
||||||
|
#include <linux/coredump.h>
|
||||||
#include <linux/utsname.h>
|
#include <linux/utsname.h>
|
||||||
#include <linux/pid_namespace.h>
|
#include <linux/pid_namespace.h>
|
||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
|
@ -39,6 +40,7 @@
|
||||||
|
|
||||||
#include <trace/events/task.h>
|
#include <trace/events/task.h>
|
||||||
#include "internal.h"
|
#include "internal.h"
|
||||||
|
#include "coredump.h"
|
||||||
|
|
||||||
#include <trace/events/sched.h>
|
#include <trace/events/sched.h>
|
||||||
|
|
||||||
|
|
6
fs/coredump.h
Normal file
6
fs/coredump.h
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
#ifndef _FS_COREDUMP_H
|
||||||
|
#define _FS_COREDUMP_H
|
||||||
|
|
||||||
|
extern int __get_dumpable(unsigned long mm_flags);
|
||||||
|
|
||||||
|
#endif
|
|
@ -63,6 +63,7 @@
|
||||||
|
|
||||||
#include <trace/events/task.h>
|
#include <trace/events/task.h>
|
||||||
#include "internal.h"
|
#include "internal.h"
|
||||||
|
#include "coredump.h"
|
||||||
|
|
||||||
#include <trace/events/sched.h>
|
#include <trace/events/sched.h>
|
||||||
|
|
||||||
|
|
|
@ -132,11 +132,6 @@ extern int copy_strings_kernel(int argc, const char *const *argv,
|
||||||
struct linux_binprm *bprm);
|
struct linux_binprm *bprm);
|
||||||
extern int prepare_bprm_creds(struct linux_binprm *bprm);
|
extern int prepare_bprm_creds(struct linux_binprm *bprm);
|
||||||
extern void install_exec_creds(struct linux_binprm *bprm);
|
extern void install_exec_creds(struct linux_binprm *bprm);
|
||||||
#ifdef CONFIG_COREDUMP
|
|
||||||
extern void do_coredump(long signr, int exit_code, struct pt_regs *regs);
|
|
||||||
#else
|
|
||||||
static inline void do_coredump(long signr, int exit_code, struct pt_regs *regs) {}
|
|
||||||
#endif
|
|
||||||
extern void set_binfmt(struct linux_binfmt *new);
|
extern void set_binfmt(struct linux_binfmt *new);
|
||||||
extern void free_bprm(struct linux_binprm *);
|
extern void free_bprm(struct linux_binprm *);
|
||||||
|
|
||||||
|
|
|
@ -11,5 +11,10 @@
|
||||||
*/
|
*/
|
||||||
extern int dump_write(struct file *file, const void *addr, int nr);
|
extern int dump_write(struct file *file, const void *addr, int nr);
|
||||||
extern int dump_seek(struct file *file, loff_t off);
|
extern int dump_seek(struct file *file, loff_t off);
|
||||||
|
#ifdef CONFIG_COREDUMP
|
||||||
|
extern void do_coredump(long signr, int exit_code, struct pt_regs *regs);
|
||||||
|
#else
|
||||||
|
static inline void do_coredump(long signr, int exit_code, struct pt_regs *regs) {}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* _LINUX_COREDUMP_H */
|
#endif /* _LINUX_COREDUMP_H */
|
||||||
|
|
|
@ -405,7 +405,6 @@ static inline void arch_pick_mmap_layout(struct mm_struct *mm) {}
|
||||||
|
|
||||||
extern void set_dumpable(struct mm_struct *mm, int value);
|
extern void set_dumpable(struct mm_struct *mm, int value);
|
||||||
extern int get_dumpable(struct mm_struct *mm);
|
extern int get_dumpable(struct mm_struct *mm);
|
||||||
extern int __get_dumpable(unsigned long mm_flags);
|
|
||||||
|
|
||||||
/* get/set_dumpable() values */
|
/* get/set_dumpable() values */
|
||||||
#define SUID_DUMPABLE_DISABLED 0
|
#define SUID_DUMPABLE_DISABLED 0
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
#include <linux/fs.h>
|
#include <linux/fs.h>
|
||||||
#include <linux/tty.h>
|
#include <linux/tty.h>
|
||||||
#include <linux/binfmts.h>
|
#include <linux/binfmts.h>
|
||||||
|
#include <linux/coredump.h>
|
||||||
#include <linux/security.h>
|
#include <linux/security.h>
|
||||||
#include <linux/syscalls.h>
|
#include <linux/syscalls.h>
|
||||||
#include <linux/ptrace.h>
|
#include <linux/ptrace.h>
|
||||||
|
|
Loading…
Add table
Reference in a new issue