From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754064AbcB2UHt (ORCPT ); Mon, 29 Feb 2016 15:07:49 -0500 Received: from www.linutronix.de ([62.245.132.108]:42435 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753209AbcB2UHq (ORCPT ); Mon, 29 Feb 2016 15:07:46 -0500 Date: Mon, 29 Feb 2016 21:06:10 +0100 (CET) From: Thomas Gleixner To: Will Deacon cc: Brian Gerst , LKML , Linus Torvalds , Andrew Morton , Ingo Molnar , Peter Zijlstra , Peter Anvin , Oleg Nesterov , linux-arch@vger.kernel.org, Tejun Heo , Steven Rostedt , Rusty Russell , Paul McKenney , Rafael Wysocki , Arjan van de Ven , Rik van Riel , "Srivatsa S. Bhat" , Sebastian Siewior , Paul Turner , Russell King , Catalin Marinas , Ralf Baechle , Yoshinori Sato Subject: Re: [patch 01/20] idle: Move x86ism out of generic code In-Reply-To: <20160229194810.GI14848@arm.com> Message-ID: References: <20160226164321.657646833@linutronix.de> <20160226182340.242063758@linutronix.de> <20160229194810.GI14848@arm.com> User-Agent: Alpine 2.11 (DEB 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 29 Feb 2016, Will Deacon wrote: > On Mon, Feb 29, 2016 at 08:35:41PM +0100, Thomas Gleixner wrote: > > On Sat, 27 Feb 2016, Brian Gerst wrote: > > > > arch_cpu_idle_prepare(); > > > > cpu_idle_loop(); > > > > } > > > > > > Does this actually work with stack protector enabled? > > > boot_init_stack_canary() is inlined while arch_cpu_idle_prepare() is > > > not. > > > > Stupid me. No it does of course not. I could have sworn that I tested that, > > but obvioulsy not. > > > > I drop that patch, but actually the real question is whether we can drop that > > '#ifdef x86' around that boot_init_stack_canary() invocation. > > > > AFAICT, neither arm, arm64 nor mips and sh call it on anything else than the > > boot cpu. I can't see why that would be an issue on those architectures and > > why it would be a problem if the boot cpu calls it again here. > > > > CC'ed the relevant maintainers. Is there any issue with the patch below? > > On arm[64], the canary is unfortunately global, so I don't think it would > be safe to update it live like this without effectively stopping the > machine and forcing everybody into idle. Thanks for clarification. Thomas