From: Andrew Morton <akpm@osdl.org>
To: Josh Aas <josha@sgi.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] add core dump file name pattern option for cpu id
Date: Tue, 27 Jul 2004 12:31:15 -0700 [thread overview]
Message-ID: <20040727123115.794577d7.akpm@osdl.org> (raw)
In-Reply-To: <1090955660.20503.13.camel@coetzee.americas.sgi.com>
Josh Aas <josha@sgi.com> wrote:
>
> ---------------------------------------------------------
> --- a/fs/exec.c 2004-07-13 14:32:24.000000000 -0500
> +++ b/fs/exec.c 2004-07-15 13:16:17.000000000 -0500
> @@ -1276,6 +1276,14 @@ void format_corename(char *corename, con
> goto out;
> out_ptr += rc;
> break;
> + /* cpu id */
> + case 'c':
> + rc = snprintf(out_ptr, out_end - out_ptr,
> + "%d", smp_processor_id());
> + if (rc > out_end - out_ptr)
> + goto out;
> + out_ptr += rc;
> + break;
> default:
> break;
> }
> ---------------------------------------------------------
>
> Is there any reason this couldn't be taken into the kernel? I didn't get
> any response at all and it seems to be a safe and useful patch. Any
> feedback would be appreciated.
There's no guarantee at all that we're still running on the same CPU by the
time we get here.
Possibly do_coredump() could fish the relevant info out of the pt_regs in
some arch-dependent way, or it needs to be propagated down in some manner.
Either way, the patch will become more complex.
Any future revision of this patch should include an update to
Documentation/sysctl/kernel.txt:core_pattern please.
prev parent reply other threads:[~2004-07-27 19:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-07-27 19:14 Josh Aas
2004-07-27 19:31 ` 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=20040727123115.794577d7.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=josha@sgi.com \
--cc=linux-kernel@vger.kernel.org \
/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
all inboxes | Powered by JetHome®