lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1207168464.11976.48.camel@bobble.smo.corp.google.com>
Date:	Wed, 02 Apr 2008 13:34:24 -0700
From:	Frank Mayhar <fmayhar@...gle.com>
To:	Roland McGrath <roland@...hat.com>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: posix-cpu-timers revamp

On Wed, 2008-04-02 at 12:48 -0700, Roland McGrath wrote:
> > One quick note:  this inline isn't needed for the 2b solution (allocate
> > percpu storage in copy_signal CLONE_THREAD case), since if there's more
> > than one thread there'll always be a percpu area and if there's only one
> > thread the summation code won't be entered.
> 
> That's true.  I still think it's a good idea to have it, even if it winds
> up being empty in the variants we really use.  The principle is that the
> new set of types/functions could be used to implement exactly what we have
> now.  In fact, it's usually best to do a series of small patches that start
> with introducing the abstraction while not changing anything.

Ah, okay.  Well, except that the whole point of this exercise is to fix
that hang. :-)  But yeah, I understand.

> > And another quick note:  It appears that with the "allocate percpu
> > storage in copy_signal CLONE_THREAD case" mechanism, I don't need to
> > worry about allocating it anywhere else.  If I need it (which is only in
> > the case of multiple threads and an interval timer) then I'll have it
> > because it was allocated with the second thread.  
> 
> That's correct.
> 
> > So I just eliminate the allocation in do_setitimer() entirely.
> 
> Again, I'd leave the call to the inline that would do it.
> For this implementation plan, its body is:
> 	BUG_ON(!task->signal->cputime.totals && !thread_group_empty(task));

BTW I did look at allocating it in posix_cpu_timer_set() and
set_process_cpu_timer() but the first at least is doing stuff with locks
held.  I'll keep looking at it, though.

One little gotcha we just ran into, though:  When checking
tsk->signal->(anything) in run_posix_cpu_timers(), we have to hold
tasklist_lock to avoid a race with release_task().  This is going to
make even the null case always cost more than before.
-- 
Frank Mayhar <fmayhar@...gle.com>
Google, Inc.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ