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:	Sat, 6 Jun 2015 10:02:30 +0200
From:	Ralf Baechle DL5RB <ralf@...ux-mips.org>
To:	Vaishali Thakkar <vthakkar1994@...il.com>
Cc:	"David S. Miller" <davem@...emloft.net>,
	linux-hams@...r.kernel.org, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org, Julia Lawall <julia.lawall@...6.fr>
Subject: Re: [PATCH] net: rose: Use mod_timer

Hi Vaishali,

On Sat, Jun 06, 2015 at 09:52:34AM +0530, Vaishali Thakkar wrote:

> Use mod_timer instead of del_timer followed by add_timer to update
> the expire field of the active timer.
> 
> The semantic patch that performs this transformation is as follows:
> 
> @change@
> expression e1, e2, e3, e4;
> @@
> 
> - del_timer(&e1);
> ... when != e1 = e3
> - e1.expires = e2;
> ... when != e1 = e4
> - add_timer (&e1);
> + mod_timer (&e1, e2);

This isn't quite right.  All the instances of this pattern in the ROSE
stack also modify the timer's data and function fields which if the timer
is still running and expiring while being fiddled with, might result in
a race condition, that is the old function but new data field being used
in combination or something like that.

For some of the timers (maybe all?) it should be possible to proof that
always the same values for data and function are being used.  These
initializations could then be used elsewhere and the code could then
indeed be switched to mod_timer.

  Ralf
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ