From: Ingo Molnar <mingo@elte.hu>
To: Yinghai Lu <yinghai@kernel.org>
Cc: mingo@redhat.com, hpa@zytor.com, linux-kernel@vger.kernel.org,
fenghua.yu@intel.com, tglx@linutronix.de, hpa@linux.intel.com,
linux-tip-commits@vger.kernel.org
Subject: Re: [tip:x86/smep] x86, cpu: Enable/disable Supervisor Mode Execution Protection
Date: Sat, 21 May 2011 12:43:10 +0200 [thread overview]
Message-ID: <20110521104310.GC26447@elte.hu> (raw)
In-Reply-To: <4DD6D965.4010606@kernel.org>
* Yinghai Lu <yinghai@kernel.org> wrote:
> > +static __init void setup_smep(struct cpuinfo_x86 *c)
> > +{
> > + if (cpu_has(c, X86_FEATURE_SMEP)) {
> > + if (unlikely(disable_smep)) {
> > + setup_clear_cpu_cap(X86_FEATURE_SMEP);
> > + clear_in_cr4(X86_CR4_SMEP);
> > + } else
> > + set_in_cr4(X86_CR4_SMEP);
> > + }
> > +}
>
> should be __cpuinit for this function.
>
> otherwise got:
>
> WARNING: arch/x86/built-in.o(.cpuinit.text+0x1b10): Section mismatch in reference from the function identify_cpu() to the function .init.text:setup_smep()
> The function __cpuinit identify_cpu() references
> a function __init setup_smep().
> If setup_smep is only used by identify_cpu then
> annotate setup_smep with a matching annotation.
Yeah, indeed, and it might in fact crash with certain .config's. Mind sending a
tested patch?
Thanks,
Ingo
prev parent reply other threads:[~2011-05-21 10:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-11 23:51 [PATCH 3/3 v2] x86, cpu: Enable/disable SMEP Fenghua Yu
2011-05-18 5:13 ` [tip:x86/smep] x86, cpu: Enable/disable Supervisor Mode Execution Protection tip-bot for Fenghua Yu
2011-05-20 21:13 ` Yinghai Lu
2011-05-21 10:43 ` Ingo Molnar [this message]
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=20110521104310.GC26447@elte.hu \
--to=mingo@elte.hu \
--cc=fenghua.yu@intel.com \
--cc=hpa@linux.intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=yinghai@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.