public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Neil Horman <nhorman@tuxdriver.com>
Cc: linux-kernel@vger.kernel.org, wwoods@redhat.com
Subject: Re: [PATCH]: allow individual core dump methods to be unlimited when sending to a pipe
Date: Tue, 24 Jul 2007 02:09:39 -0700	[thread overview]
Message-ID: <20070724020939.7644f18c.akpm@linux-foundation.org> (raw)
In-Reply-To: <20070722153947.GA11941@hmsreliant.homelinux.net>

On Sun, 22 Jul 2007 11:39:47 -0400 Neil Horman <nhorman@tuxdriver.com> wrote:

> 	This is a follow on to the patch entitled:
> update-coredump-path-in-kernel-to-not-check-coredump-rlim-if-core_pattern-is-a-pipe.patch
> It allows individual core dump methods to have the core dump size limit passed
> into them.  Its more efficient than each method having to retrieve it on their
> own, and it allows for do_coredump to specify a infinite limit in the event that
> a pipe is configured in /proc/sys/kernel/core_pattern, in which case ulimit -c
> should not apply.

Needed this warning fix:

fs/exec.c: In function 'do_coredump':
fs/exec.c:1761: warning: large integer implicitly truncated to unsigned type

diff -puN fs/exec.c~allow-individual-core-dump-methods-to-be-unlimited-when-sending-to-a-pipe-fix fs/exec.c
--- a/fs/exec.c~allow-individual-core-dump-methods-to-be-unlimited-when-sending-to-a-pipe-fix
+++ a/fs/exec.c
@@ -1703,7 +1703,7 @@ int do_coredump(long signr, int exit_cod
 	int fsuid = current->fsuid;
 	int flag = 0;
 	int ispipe = 0;
-	u32 core_limit = current->signal->rlim[RLIMIT_CORE].rlim_cur;
+	unsigned long core_limit = current->signal->rlim[RLIMIT_CORE].rlim_cur;
 
 	audit_core_dumps(signr);
 
_

which makes me worry about how much care was taken here on 32/64 issues,
and crsos-arch issues (the underlying type for compat_ulong_t, for one).

Could you please go over it with a toothcomb, see if there are any other
slipups there?


Thanks.

  reply	other threads:[~2007-07-24  9:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-22 15:39 [PATCH]: allow individual core dump methods to be unlimited when sending to a pipe Neil Horman
2007-07-24  9:09 ` Andrew Morton [this message]
2007-07-24 10:38   ` Neil Horman
2007-07-24 15:17   ` Neil Horman
2007-07-25  5:03     ` Andrew Morton
2007-07-25 13:37       ` Neil Horman

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=20070724020939.7644f18c.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nhorman@tuxdriver.com \
    --cc=wwoods@redhat.com \
    /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