Re: [PATCH v6 3/8] x86/microcode/AMD: Check microcode container data in the early loader

2018-06-15 Thread Borislav Petkov
On Thu, Jun 14, 2018 at 10:56:07PM +0200, Maciej S. Szmigiero wrote: > At this point we don't know the CPU family the particular patch is for > since the patch header contains only CPU rev_id, not an explicit family > number. patch_fam = 0xf + (mc->processor_rev_id >> 12); which means,

Re: [PATCH v6 3/8] x86/microcode/AMD: Check microcode container data in the early loader

2018-06-15 Thread Borislav Petkov
On Thu, Jun 14, 2018 at 10:56:07PM +0200, Maciej S. Szmigiero wrote: > At this point we don't know the CPU family the particular patch is for > since the patch header contains only CPU rev_id, not an explicit family > number. patch_fam = 0xf + (mc->processor_rev_id >> 12); which means,

Re: [PATCH v6 3/8] x86/microcode/AMD: Check microcode container data in the early loader

2018-06-14 Thread Maciej S. Szmigiero
On 05.06.2018 10:54, Borislav Petkov wrote: (..) >> @@ -258,25 +265,27 @@ static ssize_t parse_container(u8 *ucode, ssize_t >> size, struct cont_desc *desc) >> >> hdr = (u32 *)buf; >> >> -if (hdr[0] != UCODE_UCODE_TYPE) >> +if (!verify_patch_section(buf,

Re: [PATCH v6 3/8] x86/microcode/AMD: Check microcode container data in the early loader

2018-06-14 Thread Maciej S. Szmigiero
On 05.06.2018 10:54, Borislav Petkov wrote: (..) >> @@ -258,25 +265,27 @@ static ssize_t parse_container(u8 *ucode, ssize_t >> size, struct cont_desc *desc) >> >> hdr = (u32 *)buf; >> >> -if (hdr[0] != UCODE_UCODE_TYPE) >> +if (!verify_patch_section(buf,

Re: [PATCH v6 3/8] x86/microcode/AMD: Check microcode container data in the early loader

2018-06-05 Thread Borislav Petkov
On Sun, May 20, 2018 at 12:07:17AM +0200, Maciej S. Szmigiero wrote: > Convert the early loader in the AMD microcode update driver to use the > container data checking functions introduced by the previous commit. > > We have to be careful to call these functions with 'early' parameter set, > so

Re: [PATCH v6 3/8] x86/microcode/AMD: Check microcode container data in the early loader

2018-06-05 Thread Borislav Petkov
On Sun, May 20, 2018 at 12:07:17AM +0200, Maciej S. Szmigiero wrote: > Convert the early loader in the AMD microcode update driver to use the > container data checking functions introduced by the previous commit. > > We have to be careful to call these functions with 'early' parameter set, > so

[PATCH v6 3/8] x86/microcode/AMD: Check microcode container data in the early loader

2018-05-19 Thread Maciej S. Szmigiero
Convert the early loader in the AMD microcode update driver to use the container data checking functions introduced by the previous commit. We have to be careful to call these functions with 'early' parameter set, so they won't try to print errors as the early loader runs too early for

[PATCH v6 3/8] x86/microcode/AMD: Check microcode container data in the early loader

2018-05-19 Thread Maciej S. Szmigiero
Convert the early loader in the AMD microcode update driver to use the container data checking functions introduced by the previous commit. We have to be careful to call these functions with 'early' parameter set, so they won't try to print errors as the early loader runs too early for