Re: [PATCH -v2] x86, microcode, AMD: Sanity-check initrd image

2014-02-03 Thread Borislav Petkov
On Mon, Feb 03, 2014 at 03:28:51PM -0500, Boris Ostrovsky wrote: > On 02/03/2014 02:52 PM, Borislav Petkov wrote: > >On Mon, Feb 03, 2014 at 02:37:34PM -0500, Boris Ostrovsky wrote: > >>It exploded when 'if (!container)' check was done *after* relocation, > >>which made container non-zero. If you d

Re: [PATCH -v2] x86, microcode, AMD: Sanity-check initrd image

2014-02-03 Thread Boris Ostrovsky
On 02/03/2014 02:52 PM, Borislav Petkov wrote: On Mon, Feb 03, 2014 at 02:37:34PM -0500, Boris Ostrovsky wrote: It exploded when 'if (!container)' check was done *after* relocation, which made container non-zero. If you do the check *before* then I think you will catch the fact that container is

Re: [PATCH -v2] x86, microcode, AMD: Sanity-check initrd image

2014-02-03 Thread Borislav Petkov
On Mon, Feb 03, 2014 at 02:37:34PM -0500, Boris Ostrovsky wrote: > It exploded when 'if (!container)' check was done *after* relocation, > which made container non-zero. If you do the check *before* then I > think you will catch the fact that container is empty. Ah, right, this was it. Ok, just r

Re: [PATCH -v2] x86, microcode, AMD: Sanity-check initrd image

2014-02-03 Thread Boris Ostrovsky
On 02/03/2014 02:30 PM, Borislav Petkov wrote: On Mon, Feb 03, 2014 at 02:13:27PM -0500, Boris Ostrovsky wrote: I thought that it may be sufficient to check for !container in save_microcode_in_initrd_amd() before performing relocation. If the signature was wrong, we would have found out about it

Re: [PATCH -v2] x86, microcode, AMD: Sanity-check initrd image

2014-02-03 Thread Borislav Petkov
On Mon, Feb 03, 2014 at 02:13:27PM -0500, Boris Ostrovsky wrote: > I thought that it may be sufficient to check for !container in > save_microcode_in_initrd_amd() before performing relocation. If the > signature was wrong, we would have found out about it in > load_ucode_bsp() -> apply_ucode_in_ini

Re: [PATCH -v2] x86, microcode, AMD: Sanity-check initrd image

2014-02-03 Thread Boris Ostrovsky
On 02/03/2014 12:55 PM, Borislav Petkov wrote: On Thu, Jan 30, 2014 at 08:54:13PM +0100, Borislav Petkov wrote: Yeah, it is simpler. Ok, will change. Ok, let's have another run at it. This one takes care of the relocated ramdisk on 64-bit too, as we do it there also, not only on 32-bit. It boot

[PATCH -v2] x86, microcode, AMD: Sanity-check initrd image

2014-02-03 Thread Borislav Petkov
On Thu, Jan 30, 2014 at 08:54:13PM +0100, Borislav Petkov wrote: > Yeah, it is simpler. Ok, will change. Ok, let's have another run at it. This one takes care of the relocated ramdisk on 64-bit too, as we do it there also, not only on 32-bit. It boots fine here on the 32/64-bit guests. --- From: