From: Andrew Morton <akpm@linux-foundation.org>
To: Randy Dunlap <rdunlap@xenotime.net>
Cc: linux-kernel@vger.kernel.org, Al Viro <viro@zeniv.linux.org.uk>,
linux-fsdevel@vger.kernel.org, linux-next@vger.kernel.org,
Alex Kelly <alex.page.kelly@gmail.com>
Subject: Re: mmotm 2012-09-06-16-46 uploaded (fs/binfmt_aout)
Date: Tue, 11 Sep 2012 15:17:39 -0700 [thread overview]
Message-ID: <20120911151739.cb5f2f4b.akpm@linux-foundation.org> (raw)
In-Reply-To: <504A8707.8080507@xenotime.net>
On Fri, 07 Sep 2012 16:45:11 -0700
Randy Dunlap <rdunlap@xenotime.net> wrote:
> On 09/06/2012 04:47 PM, akpm@linux-foundation.org wrote:
>
> > The mm-of-the-moment snapshot 2012-09-06-16-46 has been uploaded to
> >
> > http://www.ozlabs.org/~akpm/mmotm/
> >
>
>
> when CONFIG_COREDUMP is not enabled:
>
> ERROR: "dump_seek" [fs/binfmt_aout.ko] undefined!
> ERROR: "dump_write" [fs/binfmt_aout.ko] undefined!
Thanks. I guess we make aout_core_dump() disappear if
CONFIG_COREDUMP=n.
--- a/fs/binfmt_aout.c~coredump-make-core-dump-functionality-optional-fix-fix
+++ a/fs/binfmt_aout.c
@@ -32,31 +32,8 @@
static int load_aout_binary(struct linux_binprm *, struct pt_regs * regs);
static int load_aout_library(struct file*);
-static int aout_core_dump(struct coredump_params *cprm);
-
-static struct linux_binfmt aout_format = {
- .module = THIS_MODULE,
- .load_binary = load_aout_binary,
- .load_shlib = load_aout_library,
- .core_dump = aout_core_dump,
- .min_coredump = PAGE_SIZE
-};
-
-#define BAD_ADDR(x) ((unsigned long)(x) >= TASK_SIZE)
-
-static int set_brk(unsigned long start, unsigned long end)
-{
- start = PAGE_ALIGN(start);
- end = PAGE_ALIGN(end);
- if (end > start) {
- unsigned long addr;
- addr = vm_brk(start, end - start);
- if (BAD_ADDR(addr))
- return addr;
- }
- return 0;
-}
+#ifdef CONFIG_COREDUMP
/*
* Routine writes a core dump image in the current directory.
* Currently only a stub-function.
@@ -66,7 +43,6 @@ static int set_brk(unsigned long start,
* field, which also makes sure the core-dumps won't be recursive if the
* dumping of the process results in another error..
*/
-
static int aout_core_dump(struct coredump_params *cprm)
{
struct file *file = cprm->file;
@@ -135,6 +111,32 @@ end_coredump:
set_fs(fs);
return has_dumped;
}
+#else
+#define aout_core_dump NULL
+#endif
+
+static struct linux_binfmt aout_format = {
+ .module = THIS_MODULE,
+ .load_binary = load_aout_binary,
+ .load_shlib = load_aout_library,
+ .core_dump = aout_core_dump,
+ .min_coredump = PAGE_SIZE
+};
+
+#define BAD_ADDR(x) ((unsigned long)(x) >= TASK_SIZE)
+
+static int set_brk(unsigned long start, unsigned long end)
+{
+ start = PAGE_ALIGN(start);
+ end = PAGE_ALIGN(end);
+ if (end > start) {
+ unsigned long addr;
+ addr = vm_brk(start, end - start);
+ if (BAD_ADDR(addr))
+ return addr;
+ }
+ return 0;
+}
/*
* create_aout_tables() parses the env- and arg-strings in new user
_
prev parent reply other threads:[~2012-09-11 22:17 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-06 23:47 mmotm 2012-09-06-16-46 uploaded akpm
2012-09-07 15:12 ` Michal Hocko
2012-09-07 15:22 ` Fengguang Wu
2012-09-07 15:23 ` Michal Hocko
2012-09-07 23:45 ` mmotm 2012-09-06-16-46 uploaded (fs/binfmt_aout) Randy Dunlap
2012-09-11 22:17 ` Andrew Morton [this message]
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=20120911151739.cb5f2f4b.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=alex.page.kelly@gmail.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=rdunlap@xenotime.net \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).