Re: [tip:x86/smep] x86, cpu: Enable/disable Supervisor Mode Execution Protection

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Yinghai Lu <yinghai@xxxxxxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Stable Commits]     [Linux Stable Kernel]     [Linux Kernel]     [Linux USB Devel]     [Linux Video &Media]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux