Re: [PATCH] ptrace: add ability to retrieve signals without removing them from a queue

2013-02-21 Thread Pavel Emelyanov
On 02/21/2013 02:37 AM, Oleg Nesterov wrote: > On 02/19, Pavel Emelyanov wrote: >> >> On 02/19/2013 11:34 PM, Oleg Nesterov wrote: >>> 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

Re: [PATCH] ptrace: add ability to retrieve signals without removing them from a queue

2013-02-20 Thread Oleg Nesterov
On 02/19, Pavel Emelyanov wrote: > > On 02/19/2013 11:34 PM, Oleg Nesterov wrote: > > 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 ;) > > Isn't it the great reason f

Re: [PATCH] ptrace: add ability to retrieve signals without removing them from a queue

2013-02-19 Thread Pavel Emelyanov
On 02/19/2013 11:34 PM, Oleg Nesterov wrote: > 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 wrote: This patch adds a new ptrace request PTRACE_PEEKSIGINFO. This request is used to

Re: [PATCH] ptrace: add ability to retrieve signals without removing them from a queue

2013-02-19 Thread Oleg Nesterov
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 wrote: > >> This patch adds a new ptrace request PTRACE_PEEKSIGINFO. > >> > >> This request is used to retrieve information about a signal with the > >>

Re: [PATCH] ptrace: add ability to retrieve signals without removing them from a queue

2013-02-19 Thread Pavel Emelyanov
On 02/19/2013 04:15 PM, Michael Kerrisk (man-pages) wrote: > On Wed, Feb 13, 2013 at 4:16 PM, Andrey Vagin 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 structu

Re: [PATCH] ptrace: add ability to retrieve signals without removing them from a queue

2013-02-19 Thread Michael Kerrisk (man-pages)
On Wed, Feb 13, 2013 at 4:16 PM, Andrey Vagin 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. > >

Re: [PATCH] ptrace: add ability to retrieve signals without removing them from a queue

2013-02-19 Thread Andrey Wagin
2013/2/16 Pedro Alves : > Forgot to reply to this bit: > > On 02/15/2013 07:43 PM, Oleg Nesterov wrote: >>> We'd miss the poke >>> > variant, but that looks like something that could be always be added >>> > later. >> Yes. _POKE_ or _QUEUE_ or _DEQUEUE_, we can add more features if user- >> space w

Re: [PATCH] ptrace: add ability to retrieve signals without removing them from a queue

2013-02-15 Thread Pedro Alves
Forgot to reply to this bit: On 02/15/2013 07:43 PM, Oleg Nesterov wrote: >> We'd miss the poke >> > variant, but that looks like something that could be always be added >> > later. > Yes. _POKE_ or _QUEUE_ or _DEQUEUE_, we can add more features if user- > space wants them. In general, IMO, I agr

Re: [PATCH] ptrace: add ability to retrieve signals without removing them from a queue

2013-02-15 Thread Pedro Alves
On 02/15/2013 07:43 PM, Oleg Nesterov wrote: > On 02/15, Pedro Alves wrote: >> >> Not sure I'm reading the patch right, but it looks like GDB would >> be able to use this as alternative to PTRACE_GET_SIGINFO variant > > No, it is different. PTRACE_GETSIGINFO reports the siginfo for the signal > wh

Re: [PATCH] ptrace: add ability to retrieve signals without removing them from a queue

2013-02-15 Thread Oleg Nesterov
On 02/15, Pedro Alves wrote: > > Not sure I'm reading the patch right, but it looks like GDB would > be able to use this as alternative to PTRACE_GET_SIGINFO variant No, it is different. PTRACE_GETSIGINFO reports the siginfo for the signal which was already dequeued (ignoring the fact ->last_sigin

Re: [PATCH] ptrace: add ability to retrieve signals without removing them from a queue

2013-02-15 Thread Pedro Alves
On 02/13/2013 03:16 PM, Andrey Vagin 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

Re: [PATCH] ptrace: add ability to retrieve signals without removing them from a queue

2013-02-13 Thread Oleg Nesterov
On 02/13, Andrey Vagin 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 ad

[PATCH] ptrace: add ability to retrieve signals without removing them from a queue

2013-02-13 Thread Andrey Vagin
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