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] [day] [month] [year] [list]
Date:	Fri,  9 Apr 2010 12:38:16 -0700 (PDT)
From:	Roland McGrath <roland@...hat.com>
To:	Oleg Nesterov <oleg@...hat.com>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Alan Cox <alan@...ux.intel.com>, Ingo Molnar <mingo@...e.hu>,
	Peter Zijlstra <peterz@...radead.org>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/3] make task_struct->signal immutable/refcountable

Acked-by: Roland McGrath <roland@...hat.com>
but some comments:

> This patch adds the reference counter, sigcnt, into signal_struct. This
> reference is owned by task_struct and it is dropped in __put_task_struct().

I'm not thrilled about the field name, but whatever.  We now have three
atomic counts with subtly different meanings, and no comments anywhere
really explaining it all.

* live: created and not yet begun to exit
* count: not yet reaped
* sigcnt: task_struct not yet freed

> Perhaps it makes sense to export get/put_signal_struct() later, but
> currently I don't see the immediate reason.

We should never export those at all.  In fact, I would not even make it a
separate inline.  We're here to simplify the lifetime rules, not give new
ways to complicate them.  If anybody wants to keep a signal_struct alive,
they can do it with get_task_struct().

> 	- with or without this patch signal_struct->count should go away,
> 	  or at least it should be "int nr_threads" for fs/proc. This will
> 	  be addressed later.

Indeed.  IMHO adding yet another atomic count here is OK only on the
proviso that we will be getting rid of the old one RSN.


Thanks,
Roland
--
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