Re: [PATCH] x86/microcode/intel: Ensure new microcode processor flags match with cpu's pf

2018-06-19 Thread Borislav Petkov
On Tue, Jun 19, 2018 at 05:24:20PM +0800, Zhenzhong Duan wrote: > On 2018/6/19 17:12, Borislav Petkov wrote: > > On Tue, Jun 19, 2018 at 12:49:40PM +0800, Zhenzhong Duan wrote: > > > Imagine kernel already found a microcode blob A with extended sig/pf > > > matching current cpu, then another microc

Re: [PATCH] x86/microcode/intel: Ensure new microcode processor flags match with cpu's pf

2018-06-19 Thread Zhenzhong Duan
On 2018/6/19 17:12, Borislav Petkov wrote: On Tue, Jun 19, 2018 at 12:49:40PM +0800, Zhenzhong Duan wrote: Imagine kernel already found a microcode blob A with extended sig/pf matching current cpu, then another microcode B is checked which doesn't match current cpu... Do you see the if

Re: [PATCH] x86/microcode/intel: Ensure new microcode processor flags match with cpu's pf

2018-06-19 Thread Borislav Petkov
On Tue, Jun 19, 2018 at 12:49:40PM +0800, Zhenzhong Duan wrote: > Imagine kernel already found a microcode blob A with extended sig/pf > matching current cpu, then another microcode B is checked which doesn't > match current cpu... Do you see the if (!microcode_matches(mc_header, uci->cpu

Re: [PATCH] x86/microcode/intel: Ensure new microcode processor flags match with cpu's pf

2018-06-18 Thread Zhenzhong Duan
On 2018/6/19 3:56, Borislav Petkov wrote: On Mon, Jun 04, 2018 at 08:16:51AM +, Zhenzhong Duan wrote: Intel spec says: 'The processor flags in the 48-byte header and the processor flags field associated with the extended processor signature structures may have multiple bits set.' Make sure

Re: [PATCH] x86/microcode/intel: Ensure new microcode processor flags match with cpu's pf

2018-06-18 Thread Borislav Petkov
On Mon, Jun 04, 2018 at 08:16:51AM +, Zhenzhong Duan wrote: > Intel spec says: 'The processor flags in the 48-byte header and the > processor flags field associated with the extended processor signature > structures may have multiple bits set.' > > Make sure processor flags of the new microcod

[PATCH] x86/microcode/intel: Ensure new microcode processor flags match with cpu's pf

2018-06-04 Thread Zhenzhong Duan
Intel spec says: 'The processor flags in the 48-byte header and the processor flags field associated with the extended processor signature structures may have multiple bits set.' Make sure processor flags of the new microcode intersect with current cpu's. Comparing with old microcode's pf can't gu