[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070728092355.GA5808@piware.de>
Date: Sat, 28 Jul 2007 11:23:55 +0200
From: Martin Pitt <martin.pitt@...ntu.com>
To: Neil Horman <nhorman@...driver.com>
Cc: linux-kernel@...r.kernel.org, akpm@...ux-foundation.org,
jeremy@...p.org, martin.pitt@...ntu.com, wwoods@...hat.com,
Ben Collins <ben.collins@...ntu.com>
Subject: Re: [PATCH 2/3] core_pattern: allow passing of arguments to user
mode helper when core_pattern is a pipe
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
Download attachment "signature.asc" of type "application/pgp-signature" (190 bytes)
Powered by blists - more mailing lists