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: <20081117143623.GA4658@redhat.com>
Date:	Mon, 17 Nov 2008 15:36:23 +0100
From:	Oleg Nesterov <oleg@...hat.com>
To:	Roland McGrath <roland@...hat.com>
Cc:	Frank Mayhar <fmayhar@...gle.com>,
	Peter Zijlstra <peterz@...radead.org>,
	Christoph Lameter <cl@...ux-foundation.org>,
	Doug Chapman <doug.chapman@...com>, mingo@...e.hu,
	adobriyan@...il.com, akpm@...ux-foundation.org,
	linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: regression introduced by - timers: fix itimer/many thread hang

On 11/14, Oleg Nesterov wrote:
>
> Currently I am trying to find the ugly, but simple fixes for 2.6.28.
>
> account_group_user_time(), run_posix_cpu_timers() are simpler to
> fix. Again, I need to actually read the code, but afaics we can
> rely on the fact that the task is current, so we can change the
> code
>
> 	-	if (!->signal)
> 	+	if (->exit_state)
> 			return;

Yes, unless I missed something again, this should work. I'll send
the (simple) patches soon, but I have no idea how to test them.


However, I'm afraid there is another problem. On 32 bit cpus we can't
read "u64 sum_exec_runtime" atomically, and so thread_group_cputime()
can "overestimate" ->sum_exec_runtime by (up to) UINT_MAX if it races
with the thread which updates its per_cpu_ptr(.totals). This for example
means that check_process_timers() can fire the CPUCLOCK_SCHED timers
before time.

No?

Oleg.

--
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