No description
Find a file
Borislav Petkov dc53866d5c x86/cpu: Load microcode during restore_processor_state()
commit f9e14dbbd4 upstream.

When resuming from system sleep state, restore_processor_state()
restores the boot CPU MSRs. These MSRs could be emulated by microcode.
If microcode is not loaded yet, writing to emulated MSRs leads to
unchecked MSR access error:

  ...
  PM: Calling lapic_suspend+0x0/0x210
  unchecked MSR access error: WRMSR to 0x10f (tried to write 0x0...0) at rIP: ... (native_write_msr)
  Call Trace:
    <TASK>
    ? restore_processor_state
    x86_acpi_suspend_lowlevel
    acpi_suspend_enter
    suspend_devices_and_enter
    pm_suspend.cold
    state_store
    kobj_attr_store
    sysfs_kf_write
    kernfs_fop_write_iter
    new_sync_write
    vfs_write
    ksys_write
    __x64_sys_write
    do_syscall_64
    entry_SYSCALL_64_after_hwframe
   RIP: 0033:0x7fda13c260a7

To ensure microcode emulated MSRs are available for restoration, load
the microcode on the boot CPU before restoring these MSRs.

  [ Pawan: write commit message and productize it. ]

Fixes: e2a1256b17 ("x86/speculation: Restore speculation related MSRs during S3 resume")
Reported-by: Kyle D. Pelton <kyle.d.pelton@intel.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Pawan Gupta <pawan.kumar.gupta@linux.intel.com>
Tested-by: Kyle D. Pelton <kyle.d.pelton@intel.com>
Cc: stable@vger.kernel.org
Link: https://bugzilla.kernel.org/show_bug.cgi?id=215841
Link: https://lore.kernel.org/r/4350dfbf785cd482d3fafa72b2b49c83102df3ce.1650386317.git.pawan.kumar.gupta@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-05-12 12:20:22 +02:00
arch x86/cpu: Load microcode during restore_processor_state() 2022-05-12 12:20:22 +02:00
block block/compat_ioctl: fix range check in BLKGETSIZE 2022-04-27 13:39:45 +02:00
certs certs: Trigger creation of RSA module signing key if it's not an RSA key 2021-09-22 11:47:51 +02:00
crypto crypto: authenc - Fix sleep in atomic context in decrypt_tail 2022-04-15 14:14:42 +02:00
Documentation Documentation: update stable tree link 2022-04-15 14:14:38 +02:00
drivers drivers: net: hippi: Fix deadlock in rr_close() 2022-05-12 12:20:22 +02:00
firmware Fix built-in early-load Intel microcode alignment 2020-01-23 08:21:29 +01:00
fs cifs: destage any unwritten data to the server before calling copychunk_write 2022-05-12 12:20:22 +02:00
include tcp: fix potential xmit stalls caused by TCP_NOTSENT_LOWAT 2022-05-12 12:20:21 +02:00
init init/main.c: return 1 from handled __setup() functions 2022-04-15 14:15:03 +02:00
ipc shm: extend forced shm destroy to support objects from several IPC nses 2021-12-08 08:50:11 +01:00
kernel tracing: Dump stacktrace trigger to the corresponding instance 2022-04-27 13:39:42 +02:00
lib hex2bin: fix access beyond string end 2022-05-12 12:20:20 +02:00
LICENSES LICENSES: Remove CC-BY-SA-4.0 license text 2018-10-18 11:28:50 +02:00
mm mm: page_alloc: fix building error on -Werror=array-compare 2022-04-27 13:39:41 +02:00
net ip6_gre: Avoid updating tunnel->tun_hlen in __gre6_xmit() 2022-05-12 12:20:22 +02:00
samples samples/kretprobes: Fix return value if register_kretprobe() failed 2021-11-26 11:36:11 +01:00
scripts gcc-plugins: latent_entropy: use /dev/urandom 2022-04-20 09:12:50 +02:00
security Fix incorrect type in assignment of ipv6 port for audit 2022-04-15 14:14:54 +02:00
sound ASoC: wm8731: Disable the regulator when probing fails 2022-05-12 12:20:22 +02:00
tools testing/selftests/mqueue: Fix mq_perf_tests to free the allocated cpu set 2022-04-20 09:12:48 +02:00
usr initramfs: restore default compression behavior 2020-04-13 10:44:59 +02:00
virt KVM: Prevent module exit until all VMs are freed 2022-04-15 14:14:57 +02:00
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS Documentation/llvm: add documentation on building w/ Clang/LLVM 2020-09-26 18:01:31 +02:00
Makefile Linux 4.19.241 2022-05-01 17:00:38 +02:00
README

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.
See Documentation/00-INDEX for a list of what is contained in each file.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.