<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/arch/x86/kernel/msr.c, branch linux-5.9.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.9.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.9.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2020-06-25T08:39:02Z</updated>
<entry>
<title>x86/msr: Filter MSR writes</title>
<updated>2020-06-25T08:39:02Z</updated>
<author>
<name>Borislav Petkov</name>
</author>
<published>2020-06-10T19:37:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a7e1f67ed29f0c339e2aa7483d13b085127566ab'/>
<id>urn:sha1:a7e1f67ed29f0c339e2aa7483d13b085127566ab</id>
<content type='text'>
Add functionality to disable writing to MSRs from userspace. Writes can
still be allowed by supplying the allow_writes=on module parameter. The
kernel will be tainted so that it shows in oopses.

Having unfettered access to all MSRs on a system is and has always been
a disaster waiting to happen. Think performance counter MSRs, MSRs with
sticky or locked bits, MSRs making major system changes like loading
microcode, MTRRs, PAT configuration, TSC counter, security mitigations
MSRs, you name it.

This also destroys all the kernel's caching of MSR values for
performance, as the recent case with MSR_AMD64_LS_CFG showed.

Another example is writing MSRs by mistake by simply typing the wrong
MSR address. System freezes have been experienced that way.

In general, poking at MSRs under the kernel's feet is a bad bad idea.

So log writing to MSRs by default. Longer term, such writes will be
disabled by default.

If userspace still wants to do that, then proper interfaces should be
defined which are under the kernel's control and accesses to those MSRs
can be synchronized and sanitized properly.

[ Fix sparse warnings. ]
Reported-by: kernel test robot &lt;lkp@intel.com&gt;
Signed-off-by: Borislav Petkov &lt;bp@suse.de&gt;
Tested-by: Sean Christopherson &lt;sean.j.christopherson@intel.com&gt;
Link: https://lkml.kernel.org/r/20200612105026.GA22660@zn.tnic
</content>
</entry>
<entry>
<title>x86/msr: Restrict MSR access when the kernel is locked down</title>
<updated>2019-08-20T04:54:16Z</updated>
<author>
<name>Matthew Garrett</name>
</author>
<published>2019-08-20T00:17:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=95f5e95f41dff31b2a4566c5a8975c08a49ae4e3'/>
<id>urn:sha1:95f5e95f41dff31b2a4566c5a8975c08a49ae4e3</id>
<content type='text'>
Writing to MSRs should not be allowed if the kernel is locked down, since
it could lead to execution of arbitrary code in kernel mode.  Based on a
patch by Kees Cook.

Signed-off-by: Matthew Garrett &lt;mjg59@google.com&gt;
Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Acked-by: Kees Cook &lt;keescook@chromium.org&gt;
Reviewed-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
cc: x86@kernel.org
Signed-off-by: James Morris &lt;jmorris@namei.org&gt;
</content>
</entry>
<entry>
<title>treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 142</title>
<updated>2019-05-30T18:25:17Z</updated>
<author>
<name>Thomas Gleixner</name>
</author>
<published>2019-05-24T10:04:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a94da204fded9dccd545782c17959469519ef3a8'/>
<id>urn:sha1:a94da204fded9dccd545782c17959469519ef3a8</id>
<content type='text'>
Based on 1 normalized pattern(s):

  this program is free software you can redistribute it and or modify
  it under the terms of the gnu general public license as published by
  the free software foundation inc 675 mass ave cambridge ma 02139 usa
  either version 2 of the license or at your option any later version
  incorporated herein by reference

extracted by the scancode license scanner the SPDX license identifier

  GPL-2.0-or-later

has been chosen to replace the boilerplate/reference in 4 file(s).

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Reviewed-by: Richard Fontana &lt;rfontana@redhat.com&gt;
Reviewed-by: Allison Randal &lt;allison@lohutok.net&gt;
Reviewed-by: Kate Stewart &lt;kstewart@linuxfoundation.org&gt;
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190524100844.465381181@linutronix.de
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>x86: Clean up 'sizeof x' =&gt; 'sizeof(x)'</title>
<updated>2018-10-29T06:13:28Z</updated>
<author>
<name>Jordan Borgner</name>
</author>
<published>2018-10-28T12:58:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0e96f31ea4249b1e94e266fe4dff908c2983a9b3'/>
<id>urn:sha1:0e96f31ea4249b1e94e266fe4dff908c2983a9b3</id>
<content type='text'>
"sizeof(x)" is the canonical coding style used in arch/x86 most of the time.
Fix the few places that didn't follow the convention.

(Also do some whitespace cleanups in a few places while at it.)

[ mingo: Rewrote the changelog. ]

Signed-off-by: Jordan Borgner &lt;mail@jordan-borgner.de&gt;
Cc: Borislav Petkov &lt;bp@alien8.de&gt;
Cc: H. Peter Anvin &lt;hpa@zytor.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/20181028125828.7rgammkgzep2wpam@JordanDesktop
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
</entry>
<entry>
<title>x86/msr: Remove bogus cleanup from the error path</title>
<updated>2016-12-25T09:47:41Z</updated>
<author>
<name>Thomas Gleixner</name>
</author>
<published>2016-12-22T09:32:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=59fefd0890f12716b39de1d4e5482fd739316262'/>
<id>urn:sha1:59fefd0890f12716b39de1d4e5482fd739316262</id>
<content type='text'>
The error cleanup which is invoked when the hotplug state setup failed
tries to remove the failed state, which is broken.

Fixes: 8fba38c937cd ("x86/msr: Convert to hotplug state machine")
Reported-by: kernel test robot &lt;fengguang.wu@intel.com&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Sebastian Siewior &lt;bigeasy@linutronix.de&gt;
</content>
</entry>
<entry>
<title>x86/msr: Convert to hotplug state machine</title>
<updated>2016-11-22T22:34:39Z</updated>
<author>
<name>Sebastian Andrzej Siewior</name>
</author>
<published>2016-11-17T18:35:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8fba38c937cd585bcf562fda8db3decb25509506'/>
<id>urn:sha1:8fba38c937cd585bcf562fda8db3decb25509506</id>
<content type='text'>
Install the callbacks via the state machine and let the core invoke
the callbacks on the already online CPUs.

Move the callbacks to online/offline as there is no point in having the
files around before the cpu is online and until its completely gone.

[ tglx: Move the callbacks to online/offline ]

Signed-off-by: Sebastian Andrzej Siewior &lt;bigeasy@linutronix.de&gt;
Cc: rt@linuxtronix.de
Link: http://lkml.kernel.org/r/20161117183541.8588-4-bigeasy@linutronix.de
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;

</content>
</entry>
<entry>
<title>x86/cpufeature: Carve out X86_FEATURE_*</title>
<updated>2016-01-30T10:22:17Z</updated>
<author>
<name>Borislav Petkov</name>
</author>
<published>2016-01-26T21:12:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=cd4d09ec6f6c12a2cc3db5b7d8876a325a53545b'/>
<id>urn:sha1:cd4d09ec6f6c12a2cc3db5b7d8876a325a53545b</id>
<content type='text'>
Move them to a separate header and have the following
dependency:

  x86/cpufeatures.h &lt;- x86/processor.h &lt;- x86/cpufeature.h

This makes it easier to use the header in asm code and not
include the whole cpufeature.h and add guards for asm.

Suggested-by: H. Peter Anvin &lt;hpa@zytor.com&gt;
Signed-off-by: Borislav Petkov &lt;bp@suse.de&gt;
Cc: Andy Lutomirski &lt;luto@amacapital.net&gt;
Cc: Borislav Petkov &lt;bp@alien8.de&gt;
Cc: Brian Gerst &lt;brgerst@gmail.com&gt;
Cc: Denys Vlasenko &lt;dvlasenk@redhat.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/1453842730-28463-5-git-send-email-bp@alien8.de
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
</entry>
<entry>
<title>new helpers: no_seek_end_llseek{,_size}()</title>
<updated>2015-12-23T15:41:31Z</updated>
<author>
<name>Al Viro</name>
</author>
<published>2015-12-06T03:04:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b25472f9b96159cc0b9b7ed449448805973cd789'/>
<id>urn:sha1:b25472f9b96159cc0b9b7ed449448805973cd789</id>
<content type='text'>
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>x86, msr: Use seek definitions instead of hard-coded values</title>
<updated>2014-10-17T20:40:55Z</updated>
<author>
<name>Fabian Frederick</name>
</author>
<published>2014-10-17T20:01:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=03452d27c6cd9cebb59a6bb0fb6bd8557916c263'/>
<id>urn:sha1:03452d27c6cd9cebb59a6bb0fb6bd8557916c263</id>
<content type='text'>
Replace 0/1 by SEEK_SET/SEEK_CUR.

Signed-off-by: Fabian Frederick &lt;fabf@skynet.be&gt;
Link: http://lkml.kernel.org/r/1413576120-27147-1-git-send-email-fabf@skynet.be
Signed-off-by: H. Peter Anvin &lt;hpa@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>x86, msr: Convert printk to pr_foo()</title>
<updated>2014-10-17T20:40:54Z</updated>
<author>
<name>Fabian Frederick</name>
</author>
<published>2014-10-17T20:01:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=951a18c6fee5d2f6f5d7b5118776bf787bf9c351'/>
<id>urn:sha1:951a18c6fee5d2f6f5d7b5118776bf787bf9c351</id>
<content type='text'>
Also define pr_fmt.

Signed-off-by: Fabian Frederick &lt;fabf@skynet.be&gt;
Link: http://lkml.kernel.org/r/1413576110-27103-1-git-send-email-fabf@skynet.be
Signed-off-by: H. Peter Anvin &lt;hpa@linux.intel.com&gt;
</content>
</entry>
</feed>
