<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/arch/x86/kernel/cpu/microcode, branch linux-3.18.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.18.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.18.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2018-01-31T13:46:14Z</updated>
<entry>
<title>x86/microcode/intel: Extend BDW late-loading further with LLC size check</title>
<updated>2018-01-31T13:46:14Z</updated>
<author>
<name>Jia Zhang</name>
</author>
<published>2018-01-23T10:41:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8e292f88f756db5c19a1d4478a8e443687980949'/>
<id>urn:sha1:8e292f88f756db5c19a1d4478a8e443687980949</id>
<content type='text'>
commit 7e702d17ed138cf4ae7c00e8c00681ed464587c7 upstream.

Commit b94b73733171 ("x86/microcode/intel: Extend BDW late-loading with a
revision check") reduced the impact of erratum BDF90 for Broadwell model
79.

The impact can be reduced further by checking the size of the last level
cache portion per core.

Tony: "The erratum says the problem only occurs on the large-cache SKUs.
So we only need to avoid the update if we are on a big cache SKU that is
also running old microcode."

For more details, see erratum BDF90 in document #334165 (Intel Xeon
Processor E7-8800/4800 v4 Product Family Specification Update) from
September 2017.

Fixes: b94b73733171 ("x86/microcode/intel: Extend BDW late-loading with a revision check")
Signed-off-by: Jia Zhang &lt;zhang.jia@linux.alibaba.com&gt;
Signed-off-by: Borislav Petkov &lt;bp@suse.de&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Acked-by: Tony Luck &lt;tony.luck@intel.com&gt;
Link: https://lkml.kernel.org/r/1516321542-31161-1-git-send-email-zhang.jia@linux.alibaba.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>x86/microcode/intel: Extend BDW late-loading with a revision check</title>
<updated>2018-01-17T08:29:30Z</updated>
<author>
<name>Jia Zhang</name>
</author>
<published>2018-01-01T02:04:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=44cd2c5e9144dc2a072a1aa0d1bf3a13389b79c2'/>
<id>urn:sha1:44cd2c5e9144dc2a072a1aa0d1bf3a13389b79c2</id>
<content type='text'>
commit b94b7373317164402ff7728d10f7023127a02b60 upstream.

Instead of blacklisting all model 79 CPUs when attempting a late
microcode loading, limit that only to CPUs with microcode revisions &lt;
0x0b000021 because only on those late loading may cause a system hang.

For such processors either:

a) a BIOS update which might contain a newer microcode revision

or

b) the early microcode loading method

should be considered.

Processors with revisions 0x0b000021 or higher will not experience such
hangs.

For more details, see erratum BDF90 in document #334165 (Intel Xeon
Processor E7-8800/4800 v4 Product Family Specification Update) from
September 2017.

[ bp: Heavily massage commit message and pr_* statements. ]

Fixes: 723f2828a98c ("x86/microcode/intel: Disable late loading on model 79")
Signed-off-by: Jia Zhang &lt;qianyue.zj@alibaba-inc.com&gt;
Signed-off-by: Borislav Petkov &lt;bp@suse.de&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Acked-by: Tony Luck &lt;tony.luck@intel.com&gt;
Cc: x86-ml &lt;x86@kernel.org&gt;
Link: http://lkml.kernel.org/r/1514772287-92959-1-git-send-email-qianyue.zj@alibaba-inc.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>x86/microcode/intel: Disable late loading on model 79</title>
<updated>2017-11-08T09:03:49Z</updated>
<author>
<name>Borislav Petkov</name>
</author>
<published>2017-10-18T11:12:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6c3c4c7373de9d0891e874f710aaee833e937f40'/>
<id>urn:sha1:6c3c4c7373de9d0891e874f710aaee833e937f40</id>
<content type='text'>
commit 723f2828a98c8ca19842042f418fb30dd8cfc0f7 upstream.

Blacklist Broadwell X model 79 for late loading due to an erratum.

Signed-off-by: Borislav Petkov &lt;bp@suse.de&gt;
Acked-by: Tony Luck &lt;tony.luck@intel.com&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Link: http://lkml.kernel.org/r/20171018111225.25635-1-bp@alien8.de
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;


</content>
</entry>
<entry>
<title>x86/microcode/intel: Guard against stack overflow in the loader</title>
<updated>2015-07-13T12:50:05Z</updated>
<author>
<name>Quentin Casasnovas</name>
</author>
<published>2015-02-03T12:00:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5ba6a2f494ab6e6d6e7fb58f099dde2f9ad06f3b'/>
<id>urn:sha1:5ba6a2f494ab6e6d6e7fb58f099dde2f9ad06f3b</id>
<content type='text'>
[ Upstream commit f84598bd7c851f8b0bf8cd0d7c3be0d73c432ff4 ]

mc_saved_tmp is a static array allocated on the stack, we need to make
sure mc_saved_count stays within its bounds, otherwise we're overflowing
the stack in _save_mc(). A specially crafted microcode header could lead
to a kernel crash or potentially kernel execution.

Signed-off-by: Quentin Casasnovas &lt;quentin.casasnovas@oracle.com&gt;
Cc: "H. Peter Anvin" &lt;hpa@zytor.com&gt;
Cc: Fenghua Yu &lt;fenghua.yu@intel.com&gt;
Link: http://lkml.kernel.org/r/1422964824-22056-1-git-send-email-quentin.casasnovas@oracle.com
Signed-off-by: Borislav Petkov &lt;bp@suse.de&gt;
Signed-off-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
</content>
</entry>
<entry>
<title>x86, microcode: Return error from driver init code when loader is disabled</title>
<updated>2015-02-11T07:00:56Z</updated>
<author>
<name>Boris Ostrovsky</name>
</author>
<published>2015-01-28T02:21:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ff0d1886ef0210b5dbc08934340aaf029b59aea4'/>
<id>urn:sha1:ff0d1886ef0210b5dbc08934340aaf029b59aea4</id>
<content type='text'>
commit da63865a01c6384d459464e5165d95d4f04878d8 upstream.

Commits 65cef1311d5d ("x86, microcode: Add a disable chicken bit") and
a18a0f6850d4 ("x86, microcode: Don't initialize microcode code on
paravirt") allow microcode driver skip initialization when microcode
loading is not permitted.

However, they don't prevent the driver from being loaded since the
init code returns 0. If at some point later the driver gets unloaded
this will result in an oops while trying to deregister the (never
registered) device.

To avoid this, make init code return an error on paravirt or when
microcode loading is disabled. The driver will then never be loaded.

Signed-off-by: Boris Ostrovsky &lt;boris.ostrovsky@oracle.com&gt;
Link: http://lkml.kernel.org/r/1422411669-25147-1-git-send-email-boris.ostrovsky@oracle.com
Reported-by: James Digwall &lt;james@dingwall.me.uk&gt;
Signed-off-by: Borislav Petkov &lt;bp@suse.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>x86/microcode/intel: Fish out the stashed microcode for the BSP</title>
<updated>2015-01-08T18:30:22Z</updated>
<author>
<name>Borislav Petkov</name>
</author>
<published>2014-12-08T11:08:20Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f3d4175f055094fca46a81d0066c692c8a7a7bd5'/>
<id>urn:sha1:f3d4175f055094fca46a81d0066c692c8a7a7bd5</id>
<content type='text'>
commit 25cdb9c86826f8d035d8aaa07fc36832e76bd8a0 upstream.

I'm such a moron! The simple solution of saving the BSP patch
for use on resume was too simple (and wrong!), hint:
sizeof(struct microcode_intel).

What needs to be done instead is to fish out the microcode patch
we have stashed previously and apply that on the BSP in case the
late loader hasn't been utilized.

So do that instead.

Signed-off-by: Borislav Petkov &lt;bp@suse.de&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Link: http://lkml.kernel.org/r/20141208110820.GB20057@pd.tnic
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>x86, microcode: Reload microcode on resume</title>
<updated>2015-01-08T18:30:22Z</updated>
<author>
<name>Borislav Petkov</name>
</author>
<published>2014-12-03T16:21:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d239198442d300710a2389449a583edbcfb68581'/>
<id>urn:sha1:d239198442d300710a2389449a583edbcfb68581</id>
<content type='text'>
commit fbae4ba8c4a387e306adc9c710e5c225cece7678 upstream.

Normally, we do reapply microcode on resume. However, in the cases where
that microcode comes from the early loader and the late loader hasn't
been utilized yet, there's no easy way for us to go and apply the patch
applied during boot by the early loader.

Thus, reuse the patch stashed by the early loader for the BSP.

Signed-off-by: Borislav Petkov &lt;bp@suse.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>x86, microcode: Don't initialize microcode code on paravirt</title>
<updated>2015-01-08T18:30:22Z</updated>
<author>
<name>Boris Ostrovsky</name>
</author>
<published>2014-12-01T21:27:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=44c4db3ab0378564d40f9b6aafd12908cdcb97ca'/>
<id>urn:sha1:44c4db3ab0378564d40f9b6aafd12908cdcb97ca</id>
<content type='text'>
commit a18a0f6850d4b286a5ebf02cd5b22fe496b86349 upstream.

Paravirtual guests are not expected to load microcode into processors
and therefore it is not necessary to initialize microcode loading
logic.

In fact, under certain circumstances initializing this logic may cause
the guest to crash. Specifically, 32-bit kernels use __pa_nodebug()
macro which does not work in Xen (the code path that leads to this macro
happens during resume when we call mc_bp_resume()-&gt;load_ucode_ap()
-&gt;check_loader_disabled_ap())

Signed-off-by: Boris Ostrovsky &lt;boris.ostrovsky@oracle.com&gt;
Link: http://lkml.kernel.org/r/1417469264-31470-1-git-send-email-boris.ostrovsky@oracle.com
Signed-off-by: Borislav Petkov &lt;bp@suse.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>x86, microcode, intel: Drop unused parameter</title>
<updated>2015-01-08T18:30:22Z</updated>
<author>
<name>Borislav Petkov</name>
</author>
<published>2014-12-01T16:50:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=97d0906a8988184ebabe8e5836c00ce77f8d2284'/>
<id>urn:sha1:97d0906a8988184ebabe8e5836c00ce77f8d2284</id>
<content type='text'>
commit 47768626c6db42cd06ff077ba12dd2cb10ab818b upstream.

apply_microcode_early() doesn't use mc_saved_data, kill it.

Signed-off-by: Borislav Petkov &lt;bp@suse.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>x86, microcode, AMD: Do not use smp_processor_id() in preemtible context</title>
<updated>2015-01-08T18:30:22Z</updated>
<author>
<name>Borislav Petkov</name>
</author>
<published>2014-12-01T10:12:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6a76bc2d9e7a1d5184692f5dc9c2c183d65f53e4'/>
<id>urn:sha1:6a76bc2d9e7a1d5184692f5dc9c2c183d65f53e4</id>
<content type='text'>
commit 2ef84b3bb97f03332f0c1edb4466b1750dcf97b5 upstream.

Hand down the cpu number instead, otherwise lockdep screams when doing

echo 1 &gt; /sys/devices/system/cpu/microcode/reload.

BUG: using smp_processor_id() in preemptible [00000000] code: amd64-microcode/2470
caller is debug_smp_processor_id+0x12/0x20
CPU: 1 PID: 2470 Comm: amd64-microcode Not tainted 3.18.0-rc6+ #26
...

Signed-off-by: Borislav Petkov &lt;bp@suse.de&gt;
Link: http://lkml.kernel.org/r/1417428741-4501-1-git-send-email-bp@alien8.de
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
</feed>
