Re: BUG: early intel microcode update violating alignment rules

2014-08-14 Thread Henrique de Moraes Holschuh
On Mon, 11 Aug 2014, Bill Davidsen wrote: > Don't suppose you have anything in memory right after the microcode > which you could put on the stack (15 bytes) slide the image up into > alignment, load it, and put everything back. Haven't looked at the > code or data, just tossing out an idea I used

Re: BUG: early intel microcode update violating alignment rules

2014-08-11 Thread Borislav Petkov
On Mon, Aug 11, 2014 at 02:52:39PM -0400, Bill Davidsen wrote: > Because if the requirement is enforced in some future revision, and > updates then fail in some insane way, the vendor is justified in > claiming "I told you so." ... provided that requirement is not some old relic which is not neede

Re: BUG: early intel microcode update violating alignment rules

2014-08-11 Thread Bill Davidsen
Borislav Petkov wrote: On Mon, Aug 11, 2014 at 10:16:13AM -0300, Henrique de Moraes Holschuh wrote: On Mon, 11 Aug 2014, Borislav Petkov wrote: On Sat, Aug 09, 2014 at 08:19:11PM -0300, Henrique de Moraes Holschuh wrote: Is there a way to fix this in the kernel for the BSP? I think you're lo

Re: BUG: early intel microcode update violating alignment rules

2014-08-11 Thread H. Peter Anvin
I don't think so. I wouldn't count on that in the long run. I'm having some discussions about this integrally at the moment. On August 11, 2014 11:18:32 AM PDT, Henrique de Moraes Holschuh wrote: >On Mon, Aug 11, 2014, at 11:51, H. Peter Anvin wrote: >> We could put a buffer in the initdata re

Re: BUG: early intel microcode update violating alignment rules

2014-08-11 Thread Henrique de Moraes Holschuh
On Mon, Aug 11, 2014, at 11:51, H. Peter Anvin wrote: > We could put a buffer in the initdata region (we really could use an > initbss region!) or in the brk. That sounds much better than the hideous crap I came up with. The buffer would need to be at least 64KiB in size to be on the safe side.

Re: BUG: early intel microcode update violating alignment rules

2014-08-11 Thread H. Peter Anvin
On 08/09/2014 04:19 PM, Henrique de Moraes Holschuh wrote: > > This will only happen when the microcode update file data inside the early > initramfs archive is not 16-byte aligned. Unfortunately, the cpio format > used in the early initramfs aligns the member file data just to 4-byte > boundarie

Re: BUG: early intel microcode update violating alignment rules

2014-08-11 Thread H. Peter Anvin
On 08/11/2014 07:00 AM, Borislav Petkov wrote: >> >> I often wonder how much of the Intel SDM is really a fairy tale... it >> certainly has enough legends from times long past inside ;-) But just like >> old stories, should you forget all about them, they sometimes grow fangs >> back and get you

Re: BUG: early intel microcode update violating alignment rules

2014-08-11 Thread Borislav Petkov
On Mon, Aug 11, 2014 at 10:16:13AM -0300, Henrique de Moraes Holschuh wrote: > On Mon, 11 Aug 2014, Borislav Petkov wrote: > > On Sat, Aug 09, 2014 at 08:19:11PM -0300, Henrique de Moraes Holschuh wrote: > > > Is there a way to fix this in the kernel for the BSP? > > > > I think you're looking at

Re: BUG: early intel microcode update violating alignment rules

2014-08-11 Thread Henrique de Moraes Holschuh
On Mon, 11 Aug 2014, Borislav Petkov wrote: > On Sat, Aug 09, 2014 at 08:19:11PM -0300, Henrique de Moraes Holschuh wrote: > > Is there a way to fix this in the kernel for the BSP? > > I think you're looking at this the wrong way around. :-) The thing that > needs fixing is the SDM since some CPUs

Re: BUG: early intel microcode update violating alignment rules

2014-08-11 Thread Borislav Petkov
On Sat, Aug 09, 2014 at 08:19:11PM -0300, Henrique de Moraes Holschuh wrote: > Is there a way to fix this in the kernel for the BSP? I think you're looking at this the wrong way around. :-) The thing that needs fixing is the SDM since some CPUs seem to accept 16-byte unaligned microcode just fine.

BUG: early intel microcode update violating alignment rules

2014-08-09 Thread Henrique de Moraes Holschuh
Hello x86 maintainers, While adding some paranoia to the Intel Microcode driver, I noticed the early Intel microcode update driver is not enforcing a 16-byte alignment when it attempts to send the microcode update data to the processor via WRMSR 79H. This 16-byte alignment requirement is stated i