lkml.org 
[lkml]   [2013]   [Feb]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] ptrace: add ability to retrieve signals without removing them from a queue
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 for making the addr point to a structure, that
> would look like
>
> struct siginfo_peek_arg {
> unsigned flags; /* all bits but 0th, that selects between private/shared
> queues, should be zero */
> unsigned int off; /* from which siginfo to start */
> unsigned int nr; /* how may siginfos to take */
> };

I am fine either way, to me everything looks better than signalfd
hacks.

But if you meant "avoid n^2", this won't help? You can't do
copy_siginfo_to_user() under ->siglock, so you need to restart
list_for_each() anyway.

Oleg.



\
 
 \ /
  Last update: 2013-02-21 00:42    [W:1.028 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site