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]
Message-ID: <871t2hkh4w.fsf@gmail.com>
Date:	Mon, 25 Jul 2016 14:59:43 +0200
From:	Nicolai Stange <nicstange@...il.com>
To:	Borislav Petkov <bp@...en8.de>
Cc:	Nicolai Stange <nicstange@...il.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...hat.com>,
	"H. Peter Anvin" <hpa@...or.com>, x86@...nel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] arch/x86/kernel/cpu/microcode/intel: don't store initrd's start

Borislav Petkov <bp@...en8.de> writes:

> On Mon, Jul 25, 2016 at 11:24:31AM +0200, Nicolai Stange wrote:
>> I tested on linux-next-20160722 (I wrote this below the '---' marker).
>
> Ok, thanks.
>
> So let's try something simpler first. That works in my kvm guest here,
> can you test it on your box too please?

Applied on top of next-20160722 and it boots (again, with the additional
http://lkml.kernel.org/g/tip-530dd8d4b9daf77e3e5d145a26210d91ced954c7@git.kernel.org
that I need on by box). But please see below.


>
> ---
> diff --git a/arch/x86/kernel/cpu/microcode/intel.c b/arch/x86/kernel/cpu/microcode/intel.c
> index 6515c802346a..b98e016ba5fc 100644
> --- a/arch/x86/kernel/cpu/microcode/intel.c
> +++ b/arch/x86/kernel/cpu/microcode/intel.c
> @@ -793,10 +793,10 @@ void __init load_ucode_intel_bsp(void)
>  void load_ucode_intel_ap(void)
>  {
>  	struct ucode_blobs *blobs_p;
> +	unsigned long *ptrs, start;
>  	struct mc_saved_data *mcs;
>  	struct ucode_cpu_info uci;
>  	enum ucode_state ret;
> -	unsigned long *ptrs;
>  
>  #ifdef CONFIG_X86_32
>  	mcs	= (struct mc_saved_data *)__pa_nodebug(&mc_saved_data);

Am I overlooking something or is this an unrelated cleanup?


> @@ -815,8 +815,14 @@ void load_ucode_intel_ap(void)
>  	if (!mcs->num_saved)
>  		return;
>  
> +	/*
> +	 * Pay attention to CONFIG_RANDOMIZE_MEMORY as it shuffles physmem
> +	 * mapping too.
> +	 */
> +	start = blobs_p->start + (PAGE_OFFSET - __PAGE_OFFSET_BASE);
> +
>  	collect_cpu_info_early(&uci);
> -	ret = load_microcode(mcs, ptrs, blobs_p->start, &uci);
> +	ret = load_microcode(mcs, ptrs, start, &uci);
>  	if (ret != UCODE_OK)
>  		return;
>

Doesn't this break the builtin-ucode case (!blobs.valid) where
blobs.start is supposed to be zero?

Thanks,

Nicolai

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ