public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Martin Pitt <martin.pitt@ubuntu.com>
To: Neil Horman <nhorman@tuxdriver.com>
Cc: Martin Pitt <martin.pitt@ubuntu.com>,
	linux-kernel@vger.kernel.org, akpm@linux-foundation.org,
	jeremy@goop.org, 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: Sun, 29 Jul 2007 11:34:18 +0200	[thread overview]
Message-ID: <20070729093418.GA5794@piware.de> (raw)
In-Reply-To: <20070728172142.GA10555@hmsreliant.homelinux.net>

[-- Attachment #1: Type: text/plain, Size: 1631 bytes --]

Hi Neil,

Neil Horman [2007-07-28 13:21 -0400]:
> Jeremy asked that I make a patch next week to address split_argv's requirement
> that the argc parameter be non-NULL.  I'll be fixing that next week, and what I
> can do is further enhance it such that it ignores spaces in quoted strings,
> which should address the case that concerns you.  I.E I can make split_argv
> behave such that:
> echo "|\"foo bar\" --pid %p" > /proc/sys/kernel/core_pattern
> results in the following argv:
> {{"foo bar"}, {"--pid"}, {"1234"}}
> 
> Which I think handles what you are looking for.

Oh, handling escaping and quoting is going to make it fairly
complicated, but sure, if you need that for other things, too, that
would solve the remaining case. I just wonder if, instead of
implementing escaping, it wouldn't be easier to first split on spaces
and then escape macros?

> Thank you for clearing me up on this.  So it would seem we're ok with what we
> have now, correct?  

Absolutely, yes.

> We just have a potential corner case to address, which I can
> reasonably handle with a modification to split_argv, that I have a
> todo on next week.

Right, it's really just for perfectionism. Spaces in executable names
are EBW anyway, and readlink()ing /proc/<pid>/exe is much more robust
anyway in terms of a small and orthogonal interface.

If the upstream kernel guys don't worry about it and consider it a
blocker for merging, I don't either. :-)

Thanks a lot,

Martin

-- 
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 --]

  parent reply	other threads:[~2007-07-29  9:34 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
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 [this message]
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=20070729093418.GA5794@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