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]
Date:	Thu, 12 Feb 2015 14:24:47 +0100
From:	Peter Zijlstra <peterz@...radead.org>
To:	"Rafael J. Wysocki" <rjw@...ysocki.net>
Cc:	Thomas Gleixner <tglx@...utronix.de>,
	Alan Cox <alan@...ux.intel.com>,
	"Li, Aubrey" <aubrey.li@...ux.intel.com>,
	LKML <linux-kernel@...r.kernel.org>,
	Linux PM list <linux-pm@...r.kernel.org>,
	ACPI Devel Maling List <linux-acpi@...r.kernel.org>,
	Kristen Carlson Accardi <kristen@...ux.intel.com>,
	John Stultz <john.stultz@...aro.org>,
	Len Brown <len.brown@...el.com>
Subject: Re: [PATCH 4/6] PM / sleep: Make it possible to quiesce timers
 during suspend-to-idle

On Wed, Feb 11, 2015 at 05:03:44AM +0100, Rafael J. Wysocki wrote:
> Index: linux-pm/include/linux/cpuidle.h
> ===================================================================
> --- linux-pm.orig/include/linux/cpuidle.h
> +++ linux-pm/include/linux/cpuidle.h
> @@ -50,6 +50,10 @@ struct cpuidle_state {
>  			int index);
>  
>  	int (*enter_dead) (struct cpuidle_device *dev, int index);

Do we want a comment here describing that enter_freeze() must not
re-enable interrupts _ever_?

To help people who want to enable this on their platform.

> +
> +	void (*enter_freeze) (struct cpuidle_device *dev,
> +			      struct cpuidle_driver *drv,
> +			      int index);
>  };

> +static void enter_freeze_proper(struct cpuidle_driver *drv,
> +				struct cpuidle_device *dev, int index)
> +{
> +	tick_freeze();
> +	/*
> +	 * The state used here cannot be a "coupled" one, because the "coupled"
> +	 * cpuidle mechanism enables interrupts and doing that with timekeeping
> +	 * suspended is generally unsafe.
> +	 */
> +	drv->states[index].enter_freeze(dev, drv, index);

	WARN_ON(!irqs_disabled());

To go along with the comment and catch fail?

> +	/*
> +	 * timekeeping_resume() that will be called by tick_unfreeze() for the
> +	 * last CPU executing it calls functions containing RCU read-side
> +	 * critical sections, so tell RCU about that.
> +	 */
> +	RCU_NONIDLE(tick_unfreeze());
> +}
--
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