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: <20151020004108.GB27292@linux-uzut.site>
Date:	Mon, 19 Oct 2015 17:41:08 -0700
From:	Davidlohr Bueso <dave@...olabs.net>
To:	Frederic Weisbecker <fweisbec@...il.com>
Cc:	Thomas Gleixner <tglx@...utronix.de>,
	LKML <linux-kernel@...r.kernel.org>,
	George Spelvin <linux@...izon.com>,
	Peter Zijlstra <peterz@...radead.org>,
	Oleg Nesterov <oleg@...hat.com>,
	"Paul E . McKenney" <paulmck@...ux.vnet.ibm.com>,
	Jason Low <jason.low2@...com>, Ingo Molnar <mingo@...nel.org>
Subject: Re: [PATCH] posix-cpu-timers: Merge running and checking_timer state
 in one field

On Tue, 20 Oct 2015, Frederic Weisbecker wrote:

>- * @checking_timer:	true when a thread in the group is in the
>- *			process of checking for thread group timers.
>- *
>+ * @state:		flags describing the current state of the cputimer.
>+ *			CPUTIMER_STATE_RUNNING bit means the timers is elapsing.

                                                              s/timers/timer

>+ * 			CPUTIMER_STATE_CHECKING bit means that the cputimer has
>+ *			expired and a thread in the group is checking the
>+ *			callback list.

These comments might be better served when defining CPUTIMER_STATE_*

[...]

>@@ -606,7 +606,7 @@ bool posix_cpu_timers_can_stop_tick(struct task_struct *tsk)
> 		return false;
>
> 	/* Check if cputimer is running. This is accessed without locking. */
>-	if (READ_ONCE(tsk->signal->cputimer.running))
>+	if (READ_ONCE(tsk->signal->cputimer.state))
> 		return false;

Could we have cases, such as the above, where .state is set to CPUTIMER_STATE_CHECKING
and therefore the check is not equivalent?

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