public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@redhat.com>
To: Lennart Poettering <mzxreary@0pointer.de>
Cc: Colin Walters <walters@verbum.org>,
	Denys Vlasenko <vda.linux@googlemail.com>,
	systemd-devel@lists.freedesktop.org,
	linux-kernel@vger.kernel.org
Subject: Re: [systemd-devel] [PATCH 2/2] coredump: Handle programs with spaces in COMM
Date: Thu, 9 May 2013 20:10:04 +0200	[thread overview]
Message-ID: <20130509181004.GA15526@redhat.com> (raw)
In-Reply-To: <20130503150824.GB24114@tango.0pointer.de>

Sorry for delay, vacation.

On 05/03, Lennart Poettering wrote:
>
> On Wed, 01.05.13 18:42, Oleg Nesterov (oleg@redhat.com) wrote:
>
> > I wouldn't say this is bug... at least this is expected.
> >
> > Sure, it is possible to rewrite format_corename/argv_split interaction,
> > but this is a bit painful and I am not sure it worth the trouble.
>
> It sounds really wrong to first merge this into one string and then
> split it up again. It sounds much more sensible to instead just pass the
> string array around all the time. What's the reason to make this one
> string first?

!ispipe case.

OK. I have to admit that this doesn't look nice even if this is
"historical" behaviour. The fix should be simple I guess,
format_corename() should construct argv by hand, argv_split()
should be avoided.

But:

	- We do not want to complicate this (ugly) code more than
	  necessary. In particular we shouldn't forget about ispipe.

	  Oh, and realloc, we can't count argc in advance or we need
	  more changes to protect against proc_dostring_coredump().

	- We should cleanup format_corename() first. If nothing else,
	  cn_escape().

	- Hmm. it seems that we also need to fix it, format_corename()
	  can leak ->corename afaics.

In short: I'll try to do this when I have time.

Oleg.


      parent reply	other threads:[~2013-05-09 18:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1367341939.6959.1.camel@localhost>
     [not found] ` <20130430174731.GC3394@in.waw.pl>
     [not found]   ` <1367349331.6959.80.camel@localhost>
2013-05-01 16:42     ` [systemd-devel] [PATCH 2/2] coredump: Handle programs with spaces in COMM Oleg Nesterov
2013-05-03 15:08       ` Lennart Poettering
2013-05-05  0:04         ` Colin Walters
2013-05-09 18:10         ` Oleg Nesterov [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=20130509181004.GA15526@redhat.com \
    --to=oleg@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mzxreary@0pointer.de \
    --cc=systemd-devel@lists.freedesktop.org \
    --cc=vda.linux@googlemail.com \
    --cc=walters@verbum.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