From: Thomas Gleixner <tglx@linutronix.de>
To: "Pan, Jacob jun" <jacob.jun.pan@intel.com>
Cc: "H. Peter Anvin" <hpa@linux.intel.com>,
"x86@kernel.org" <x86@kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/2] x86: initialize stack canary in secondary start
Date: Fri, 18 Dec 2009 17:02:35 +0100 (CET) [thread overview]
Message-ID: <alpine.LFD.2.00.0912181701470.2755@localhost.localdomain> (raw)
In-Reply-To: <43F901BD926A4E43B106BF17856F07559A257B5F@orsmsx508.amr.corp.intel.com>
On Thu, 17 Dec 2009, Pan, Jacob jun wrote:
> >From 06503838368350268a46528e134c1dad9f4f8c93 Mon Sep 17 00:00:00 2001
> From: Jacob Pan <jacob.jun.pan@intel.com>
> Date: Thu, 17 Sep 2009 07:36:43 -0700
> Subject: [PATCH 1/2] x86: initialize stack canary in secondary start
>
> some secondary clockevent setup code needs to call request_irq, which will
> cause fake stack check failure in schedule() if voluntary preemption
> model is chosen, it is safe to have stack canary initialized here early,
> since start_secondary() does not return.
Where is it initialized now ? Shouldnt the current init be removed ?
Thanks,
tglx
> Signed-off-by: Jacob Pan <jacob.jun.pan@intel.com>
> ---
> arch/x86/kernel/smpboot.c | 4 ++++
> 1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
> index 678d0b8..56ce974 100644
> --- a/arch/x86/kernel/smpboot.c
> +++ b/arch/x86/kernel/smpboot.c
> @@ -48,6 +48,7 @@
> #include <linux/err.h>
> #include <linux/nmi.h>
> #include <linux/tboot.h>
> +#include <linux/stackprotector.h>
>
> #include <asm/acpi.h>
> #include <asm/desc.h>
> @@ -324,6 +325,9 @@ notrace static void __cpuinit start_secondary(void *unused)
> /* enable local interrupts */
> local_irq_enable();
>
> + /* to prevent fake stack check failure in clock setup */
> + boot_init_stack_canary();
> +
> x86_cpuinit.setup_percpu_clockev();
>
> wmb();
> --
> 1.6.5.3
>
>
next prev parent reply other threads:[~2009-12-18 16:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-17 18:00 Pan, Jacob jun
2009-12-18 16:02 ` Thomas Gleixner [this message]
2009-12-18 17:31 ` Pan, Jacob jun
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.LFD.2.00.0912181701470.2755@localhost.localdomain \
--to=tglx@linutronix.de \
--cc=hpa@linux.intel.com \
--cc=jacob.jun.pan@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®