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]
Message-Id: <200610270903.44810.ak@suse.de>
Date:	Fri, 27 Oct 2006 09:03:44 -0700
From:	Andi Kleen <ak@...e.de>
To:	eranian@....hp.com
Cc:	linux-kernel@...r.kernel.org, akpm@...l.org
Subject: Re: [PATCH] x86_64 add missing enter_idle() calls

On Wednesday 25 October 2006 14:29, Stephane Eranian wrote:
> Andi,
>
> Looking a the exit_idle() code:
>
> static void __exit_idle(void)
> {
>         if (read_pda(isidle) == 0)
>                 return;
>         write_pda(isidle, 0);
>         atomic_notifier_call_chain(&idle_notifier, IDLE_END, NULL);
> }
>
> I am wondering whether you are exposed to a race condition  w.r.t. to
> interrupts. Supposed you are in idle, you get an interrupt and you execute
> __exit_idle(), the test evaluate to false but before you can change the
> value of isidle, you get a higher priority interrupt which then also calls
> __exit_idle(), the test is still false and you invoke the notifier, when
> you return from this interrupt you also clear the isidle, but you call the
> notifier yet a second time.
>
> I think that isidle needs to be test_and_clear atomically for this to
> guarantee only one call the notifier on __exit_idle().
>
> what do you think?

Agreed. I will fix that. Thanks

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