All of lore.kernel.org
 help / color / mirror / Atom feed
From: eshink@gmail.com
To: Ingo Molnar <mingo@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Alexander Viro <viro@zeniv.linux.org.uk>,
	Ingo Molnar <mingo@redhat.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Josh Triplett <josh@joshtriplett.org>,
	Alex Kelly <alex.page.kelly@gmail.com>,
	Heiko Carstens <heiko.carstens@de.ibm.com>,
	Serge Hallyn <serge.hallyn@canonical.com>,
	Oleg Nesterov <oleg@redhat.com>,
	"Eric W. Biederman" <ebiederm@xmission.com>,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Alex Kelly <eshink@gmail.com>
Subject: [PATCH 4/4] fs: Update coredump-related headers
Date: Sun,  5 Aug 2012 01:28:20 -0700	[thread overview]
Message-ID: <1344155300-10432-4-git-send-email-eshink@gmail.com> (raw)
In-Reply-To: <1344155300-10432-1-git-send-email-eshink@gmail.com>

From: Alex Kelly <eshink@gmail.com>

This patch creates 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/coredump.h header file, for consistency.

Signed-off-by: Alex Kelly <alex.page.kelly@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
---
 fs/coredump.c            | 2 ++
 fs/coredump.h            | 6 ++++++
 fs/exec.c                | 1 +
 include/linux/binfmts.h  | 5 -----
 include/linux/coredump.h | 5 +++++
 include/linux/sched.h    | 2 --
 kernel/signal.c          | 1 +
 7 files changed, 15 insertions(+), 7 deletions(-)
 create mode 100644 fs/coredump.h

diff --git a/fs/coredump.c b/fs/coredump.c
index 7f75060..f5ac9d7 100644
--- a/fs/coredump.c
+++ b/fs/coredump.c
@@ -14,6 +14,7 @@
 #include <linux/key.h>
 #include <linux/personality.h>
 #include <linux/binfmts.h>
+#include <linux/coredump.h>
 #include <linux/utsname.h>
 #include <linux/pid_namespace.h>
 #include <linux/module.h>
@@ -39,6 +40,7 @@
 
 #include <trace/events/task.h>
 #include "internal.h"
+#include "coredump.h" 
 
 #include <trace/events/sched.h>
 
diff --git a/fs/coredump.h b/fs/coredump.h
new file mode 100644
index 0000000..e39ff07
--- /dev/null
+++ b/fs/coredump.h
@@ -0,0 +1,6 @@
+#ifndef _FS_COREDUMP_H
+#define _FS_COREDUMP_H
+
+extern int __get_dumpable(unsigned long mm_flags);
+
+#endif
diff --git a/fs/exec.c b/fs/exec.c
index b604050..a0ad3a2 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -63,6 +63,7 @@
 
 #include <trace/events/task.h>
 #include "internal.h"
+#include "coredump.h"
 
 #include <trace/events/sched.h>
 
diff --git a/include/linux/binfmts.h b/include/linux/binfmts.h
index 00e2e89..c7b16ee 100644
--- a/include/linux/binfmts.h
+++ b/include/linux/binfmts.h
@@ -132,11 +132,6 @@ extern int copy_strings_kernel(int argc, const char *const *argv,
 			       struct linux_binprm *bprm);
 extern int prepare_bprm_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 free_bprm(struct linux_binprm *);
 
diff --git a/include/linux/coredump.h b/include/linux/coredump.h
index ba4b85a..42f9752 100644
--- a/include/linux/coredump.h
+++ b/include/linux/coredump.h
@@ -11,5 +11,10 @@
  */
 extern int dump_write(struct file *file, const void *addr, int nr);
 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 */
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 7bb5047..13ff447 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -410,10 +410,8 @@ extern void arch_unmap_area_topdown(struct mm_struct *, unsigned long);
 static inline void arch_pick_mmap_layout(struct mm_struct *mm) {}
 #endif
 
-
 extern void set_dumpable(struct mm_struct *mm, int value);
 extern int get_dumpable(struct mm_struct *mm);
-extern int __get_dumpable(unsigned long mm_flags);
 
 /* get/set_dumpable() values */
 #define SUID_DUMPABLE_DISABLED	0
diff --git a/kernel/signal.c b/kernel/signal.c
index be4f856..fb4fd72 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -17,6 +17,7 @@
 #include <linux/fs.h>
 #include <linux/tty.h>
 #include <linux/binfmts.h>
+#include <linux/coredump.h>
 #include <linux/security.h>
 #include <linux/syscalls.h>
 #include <linux/ptrace.h>
-- 
1.7.11.2

  parent reply	other threads:[~2012-08-05  8:28 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-03 21:03 [PATCH 1/2] Moved core dump functionality into its own file Alex Kelly
2012-08-03 21:03 ` [PATCH 2/2] Made core dump functionality optional Alex Kelly
2012-08-04  6:43 ` [PATCH 1/2] Moved core dump functionality into its own file Ingo Molnar
2012-08-05  8:28 ` [PATCH 1/4] fs: Move " eshink
2012-08-05  8:28   ` [PATCH 2/4] fs: Make core dump functionality optional eshink
2012-08-05  8:28   ` [PATCH 3/4] fs: Clean up some artifacts in coredump.c eshink
2012-08-05  8:28   ` eshink [this message]
2012-08-05 11:18 ` [PATCHv3 1/4] fs: Move core dump functionality into its own file Alex Kelly
2012-08-05 11:18   ` [PATCHv3 2/4] fs: Make core dump functionality optional Alex Kelly
2012-08-05 11:18   ` [PATCHv3 3/4] fs: Clean up some artifacts in coredump.c Alex Kelly
2012-08-05 11:18   ` [PATCHv3 4/4] fs: Update coredump-related headers Alex Kelly
2012-08-05 18:39   ` [NAK] Re: [PATCHv3 1/4] fs: Move core dump functionality into its own file Kees Cook

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1344155300-10432-4-git-send-email-eshink@gmail.com \
    --to=eshink@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=alex.page.kelly@gmail.com \
    --cc=ebiederm@xmission.com \
    --cc=heiko.carstens@de.ibm.com \
    --cc=josh@joshtriplett.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=mingo@redhat.com \
    --cc=oleg@redhat.com \
    --cc=peterz@infradead.org \
    --cc=serge.hallyn@canonical.com \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.