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-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.64.1005240710460.3159@boston.corp.fedex.com>
Date:	Mon, 24 May 2010 07:16:24 +0800 (SGT)
From:	Jeff Chua <jeff.chua.linux@...il.com>
To:	Johannes Berg <johannes.berg@...el.com>,
	Arjan van de Ven <arjan@...ux.intel.com>,
	"johnstul@...ibm.com" <johnstul@...ibm.com>,
	Ingo Molnar <mingo@...e.hu>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Intel Linux Wireless <ilw@...ux.intel.com>,
	"John W. Linville" <linville@...driver.com>,
	Frans Pop <elendil@...net.nl>,
	"Chatre, Reinette" <reinette.chatre@...el.com>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	lkml <linux-kernel@...r.kernel.org>
Subject: Re: Wireless IBSS on Linux-2.6.34 broken by commit
 3bbb9ec946428b96657126768f65487a48dd090c


Mon, May 24, 2010 at 5:25 AM, Arjan van de Ven <arjan@...ux.intel.com> 
wrote:
>>> can you try, instead do the following, in the apply_slack() function:
>>>
>>> just before the return expires_limit; do
>>>
>>> if (expires_limit<  expires)
>>> # # #expires_limit = expires;
>>
>> This doesn't work.
>>
>>
>>> if that does not fix it, a second thought:
>>> add, after the first if (timer->slack<  0)
>>>
>>> if (timer->slack<  0&&  expires<  jiffies)
>>> # # # #expires_limit = expires;
>>
>> This works.
>
> hmm ok so the wireless stack sets a timer way back in the past
> ok that's technically legal.
>
> how about
>
> expires_limit = expires;
>
> if (timer->slack > -1)
>        expires_limit = expires + timer->slack;
> else if (time_after(expires, jiffies))
>        expires_limit = expires + (expires - jiffies)/256;
>
> can you test such a thing and send a patch?
> (it has my Acked-By: either way)


Arjan,

Tested and working. Here's the patch. Thanks for the fix!

Jeff



--- a/kernel/timer.c.org	2010-05-24 07:09:04.000000000 +0800
+++ a/kernel/timer.c	2010-05-24 07:05:22.000000000 +0800
@@ -750,9 +750,11 @@
  	unsigned long expires_limit, mask;
  	int bit;

-	expires_limit = expires + timer->slack;
+	expires_limit = expires;

-	if (timer->slack < 0) /* auto slack: use 0.4% */
+	if (timer->slack > -1)
+		expires_limit = expires + timer->slack;
+	else if (time_after(expires, jiffies)) /* auto slack: use 0.4% */
  		expires_limit = expires + (expires - jiffies)/256;

  	mask = expires ^ expires_limit;


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