From: Martin Pitt <martin.pitt@ubuntu.com>
To: Neil Horman <nhorman@tuxdriver.com>
Cc: linux-kernel@vger.kernel.org, akpm@linux-foundation.org,
jeremy@goop.org, martin.pitt@ubuntu.com, wwoods@redhat.com,
Ben Collins <ben.collins@ubuntu.com>
Subject: Re: [PATCH 2/3] core_pattern: allow passing of arguments to user mode helper when core_pattern is a pipe
Date: Sat, 28 Jul 2007 11:23:55 +0200 [thread overview]
Message-ID: <20070728092355.GA5808@piware.de> (raw)
In-Reply-To: <20070727200746.GC18946@hmsreliant.homelinux.net>
[-- Attachment #1: Type: text/plain, Size: 1549 bytes --]
Hi Neil,
thanks a lot for your work on this!
Neil Horman [2007-07-27 16:08 -0400]:
> Hey
> Patch 2/3 of my core_pattern enhancements. This patch is a rewrite of
> my previous post for this enhancement. It uses jeremy's split_argv/free_argv
> library functions to translate core_pattern into an argv array to be passed to
> the user mode helper process.
> [...]
> if (ispipe) {
> core_limit = RLIM_INFINITY;
> + helper_argv = argv_split(GFP_KERNEL, corename+1, &helper_argc);
I just want to mention a potential problem with this: If you first
expand the macros (from pattern to corename) and then split corename
into an argv, then this breaks macro expansions containing spaces.
This mostly affects the executable name, of course.
In fact we considered this macro approach when doing the original
patches in the Ubuntu kernel, but we eventually used environment
variables because they are much easier and more robust to implement
than doing a robust macro expansion (i. e. first split core_pattern
into an argv and then call the macro expansion for each element).
I would love to use macros instead since it looks a bit cleaner, and
personally I do not care about the "executable name" macro for Apport
[1] (I grab it from /proc/pid/exe), but I wanted to mention this
possible caveat before it goes upstream.
Thank you,
Martin
[1] https://wiki.ubuntu.com/Apport
--
Martin Pitt http://www.piware.de
Ubuntu Developer http://www.ubuntu.com
Debian Developer http://www.debian.org
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2007-07-28 9:52 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-27 20:08 [PATCH 2/3] core_pattern: allow passing of arguments to user mode helper when core_pattern is a pipe Neil Horman
2007-07-27 20:54 ` Jeremy Fitzhardinge
2007-07-28 0:46 ` Neil Horman
2007-07-28 9:23 ` Martin Pitt [this message]
2007-07-28 13:46 ` Neil Horman
2007-07-28 16:17 ` Martin Pitt
2007-07-28 17:21 ` Neil Horman
2007-07-28 22:52 ` Jeremy Fitzhardinge
2007-07-29 2:21 ` Neil Horman
2007-07-29 8:53 ` Aneesh Kumar K.V
2007-07-29 12:16 ` Neil Horman
2007-07-29 9:34 ` Martin Pitt
2007-07-29 12:19 ` Neil Horman
2007-07-29 13:03 ` Eugene Teo
2007-07-29 21:58 ` 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=20070728092355.GA5808@piware.de \
--to=martin.pitt@ubuntu.com \
--cc=akpm@linux-foundation.org \
--cc=ben.collins@ubuntu.com \
--cc=jeremy@goop.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