All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
To: Oleg Nesterov <oleg@redhat.com>
Cc: roland@redhat.com, "Eric W. Biederman" <ebiederm@xmission.com>,
	Pavel Emelyanov <xemul@openvz.org>,
	bastian@waldi.eu.org, sukadev@us.ibm.com,
	Albert Cahalan <acahalan@gmail.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [RFC][PATCH] Fix si_pid in send_signal() for SEND_SIG_NOINFO
Date: Tue, 16 Dec 2008 17:50:50 -0800	[thread overview]
Message-ID: <20081217015050.GA1850@us.ibm.com> (raw)
In-Reply-To: <20081216101621.GA2784@redhat.com>

| > Ok. so should I change it to task_pid_nr_ns() ?
| 
| I don't know. I vote for your patch as is. (but please update
| the changelog).

Well, to keep the patch descriptions simple, how about I split the
two changes into two patches. First one masquerades ->si_pid with
task_pid_nr_ns() and second one uses task_tgid_nr_ns(). They
do look like unrelated changes.

| 
| > Would that still
| > be correct for say the SIGPIPE from pipe_write() ?
| 
| Again, I don't know.
| 
| But. Let's suppose we have the user-space application which
| uses .si_pid to figure out which thread hits SIGPIPE. Yes,
| this is ugly because the signal is thread-specific, but this
| works until this patch.

I have highlighted this and the the reparent-thread behavior
changes in the patch description.

| 
| Actually, I don't understand most of (all?) users of
| send_signal(SIGXXX, current, 0), SEND_SIG_PRIV looks more
| logical to me. Or, _perhaps_, we need yet another SEND_SIG_SELF
| which sets .si_pid = task_pid_vnr(target).

Ok. We have to change the __si_special() indirection or how about
removing it altogether and change uses of __si_special() to one of:

	{ SEND_SIG_NOINFO, SEND_SIG_PRIV, SEND_SIG_SELF, &info }

It would add a condition check in places like:

	disassociate_ctty(): kill_pgrp(old_pgrp, SIGHUP, on_exit);

but there aren't too many of those.

      reply	other threads:[~2008-12-17  1:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20081213024129.GB4256@us.ibm.com>
     [not found] ` <20081215143723.GA22386@redhat.com>
     [not found]   ` <20081215203715.GC11958@us.ibm.com>
2008-12-16 10:16     ` [RFC][PATCH] Fix si_pid in send_signal() for SEND_SIG_NOINFO Oleg Nesterov
2008-12-17  1:50       ` Sukadev Bhattiprolu [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=20081217015050.GA1850@us.ibm.com \
    --to=sukadev@linux.vnet.ibm.com \
    --cc=acahalan@gmail.com \
    --cc=bastian@waldi.eu.org \
    --cc=ebiederm@xmission.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oleg@redhat.com \
    --cc=roland@redhat.com \
    --cc=sukadev@us.ibm.com \
    --cc=xemul@openvz.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.