All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@redhat.com>
To: Pavel Emelyanov <xemul@parallels.com>
Cc: mtk.manpages@gmail.com, Andrey Vagin <avagin@openvz.org>,
	linux-kernel@vger.kernel.org, criu@openvz.org,
	linux-api@vger.kernel.org, Roland McGrath <roland@redhat.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
	David Howells <dhowells@redhat.com>,
	Dave Jones <davej@redhat.com>,
	Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: [PATCH] ptrace: add ability to retrieve signals without removing them from a queue
Date: Tue, 19 Feb 2013 20:34:24 +0100	[thread overview]
Message-ID: <20130219193424.GA9606@redhat.com> (raw)
In-Reply-To: <5123BC20.9040405@parallels.com>

On 02/19, Pavel Emelyanov wrote:
>
> On 02/19/2013 04:15 PM, Michael Kerrisk (man-pages) wrote:
> > On Wed, Feb 13, 2013 at 4:16 PM, Andrey Vagin <avagin@openvz.org> wrote:
> >> This patch adds a new ptrace request PTRACE_PEEKSIGINFO.
> >>
> >> This request is used to retrieve information about a signal with the
> >> specified sequence number. A siginfo_t structure is copied from the child
> >> to location data in the parent.
> >>
> >> The low 16 bits of addr contains a sequence number of signal in a queue:
> >
> > I think 16 bits is probably not enough.... Already, on the "out of the
> > box" system that I have at hand, one can queue more than 2^16-1
> > signals:
> >
> >     $ cat /proc/$$/status | grep SigQ
> >     SigQ:	2/126065
>
> Yup :( Well, actually it would be enough to have only 1 bit as "flags"
> and the rest (31 at least) for the number. But taking into account
> Oleg's wish to have an ability to extend the amount of flags

I am not sure this is really needed, and we can add more PTRACE_PEEK_
codes later. I am fine either way, we can even add PEEK_PRIVATE/SHARED
right now.

But, given that every PEEK does list_for_each() until it finds the
necessary sequence number, I am wondering how this O(n**2) will work
if you want to dump 126065 signals ;)

Oleg.

  reply	other threads:[~2013-02-19 19:34 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-13 15:16 [PATCH] ptrace: add ability to retrieve signals without removing them from a queue Andrey Vagin
2013-02-13 15:16 ` Andrey Vagin
     [not found] ` <1360768595-31943-1-git-send-email-avagin-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org>
2013-02-13 16:06   ` Oleg Nesterov
2013-02-13 16:06     ` Oleg Nesterov
2013-02-15 18:44   ` Pedro Alves
2013-02-15 18:44     ` Pedro Alves
     [not found]     ` <511E8223.6010506-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-02-15 19:43       ` Oleg Nesterov
2013-02-15 19:43         ` Oleg Nesterov
     [not found]         ` <20130215194356.GA12413-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-02-15 19:53           ` Pedro Alves
2013-02-15 19:53             ` Pedro Alves
2013-02-15 20:03         ` Pedro Alves
     [not found]           ` <511E9480.5070202-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-02-19  9:39             ` Andrey Wagin
2013-02-19  9:39               ` Andrey Wagin
2013-02-19 12:15   ` Michael Kerrisk (man-pages)
2013-02-19 12:15     ` Michael Kerrisk (man-pages)
     [not found]     ` <CAKgNAkicAGEkvNFnSso__wK6QKao8jyDu5yuRmeyUOeaXLGChw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-02-19 17:53       ` Pavel Emelyanov
2013-02-19 17:53         ` Pavel Emelyanov
2013-02-19 19:34         ` Oleg Nesterov [this message]
     [not found]           ` <20130219193424.GA9606-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-02-19 19:47             ` Pavel Emelyanov
2013-02-19 19:47               ` Pavel Emelyanov
     [not found]               ` <5123D6D6.7010904-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>
2013-02-20 22:37                 ` Oleg Nesterov
2013-02-20 22:37                   ` Oleg Nesterov
     [not found]                   ` <20130220223703.GB16194-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-02-21 10:30                     ` Pavel Emelyanov
2013-02-21 10:30                       ` Pavel Emelyanov

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=20130219193424.GA9606@redhat.com \
    --to=oleg@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=avagin@openvz.org \
    --cc=criu@openvz.org \
    --cc=davej@redhat.com \
    --cc=dhowells@redhat.com \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mtk.manpages@gmail.com \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=roland@redhat.com \
    --cc=torvalds@linux-foundation.org \
    --cc=xemul@parallels.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 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.