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: <200607181714.10386.prakash@punnoor.de>
Date:	Tue, 18 Jul 2006 17:14:06 +0200
From:	Prakash Punnoor <prakash@...noor.de>
To:	Andreas Mohr <andi@...x01.fht-esslingen.de>
Cc:	linux-kernel@...r.kernel.org, keir@...source.com,
	Tony Lindgren <tony@...mide.com>, zach@...are.com,
	Ingo Molnar <mingo@...e.hu>,
	Thomas Gleixner <tglx@...utronix.de>
Subject: Re: kernel/timer.c: next_timer_interrupt() strange/buggy(?) code (2.6.18-rc1-mm2)

Am Montag Juli 17 2006 20:53 schrieb Andreas Mohr:
>         for (i = 0; i < 4; i++) {
>                 j = INDEX(i);
>                 do {
>                         if (list_empty(varray[i]->vec + j)) {
>                                 j = (j + 1) & TVN_MASK;
>                                 continue;
>                         }
>                         list_for_each_entry(nte, varray[i]->vec + j, entry)
>                                 if (time_before(nte->expires, expires))
>                                         expires = nte->expires;
>                         if (j < (INDEX(i)) && i < 3)
>                                 list = varray[i + 1]->vec + (INDEX(i + 1));
>                         goto found;
>                 } while (j != (INDEX(i)));
>         }
> found:

is equivalent to

  for (i = 0; i < 4; i++) {
      j = INDEX(i);
      do {
          if (!list_empty(varray[i]->vec + j)) {
              list_for_each_entry(nte, varray[i]->vec + j, entry)
                  if (time_before(nte->expires, expires))
                      expires = nte->expires;
              if (j < (INDEX(i)) && i < 3)
                  list = varray[i + 1]->vec + (INDEX(i + 1));
              goto found;
          }
          j = (j + 1) & TVN_MASK;
      } while (j != (INDEX(i)));
  }
  found:


But probably the code in timer.c takes account of probabilities, thus it is a 
bit more obscure.

HTH,
-- 
(°=                 =°)
//\ Prakash Punnoor /\\
V_/                 \_V

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ