The source for the Linux kernel used in Windows Subsystem for Linux 2 (WSL2)
Перейти к файлу
Uros Bizjak 8607d7ccbf x86/fpu: Fix AMD X86_BUG_FXSAVE_LEAK fixup
[ Upstream commit 5d31174f3c8c465d9dbe88f6b9d1fe5716f44981 ]

The assembly snippet in restore_fpregs_from_fpstate() that implements
X86_BUG_FXSAVE_LEAK fixup loads the value from a random variable,
preferably the one that is already in the L1 cache.

However, the access to fpinit_state via *fpstate pointer is not
implemented correctly. The "m" asm constraint requires dereferenced
pointer variable, otherwise the compiler just reloads the value
via temporary stack slot. The current asm code reflects this:

     mov    %rdi,(%rsp)
     ...
     fildl  (%rsp)

With dereferenced pointer variable, the code does what the
comment above the asm snippet says:

     fildl  (%rdi)

Also, remove the pointless %P operand modifier. The modifier is
ineffective on non-symbolic references - it was used to prevent
%rip-relative addresses in .altinstr sections, but FILDL in the
.text section can use %rip-relative addresses without problems.

Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Link: https://lore.kernel.org/r/20240315081849.5187-1-ubizjak@gmail.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-07-05 09:14:43 +02:00
Documentation dt-bindings: i2c: google,cros-ec-i2c-tunnel: correct path to i2c-controller schema 2024-07-05 09:14:35 +02:00
LICENSES LICENSES/dual/CC-BY-4.0: Git rid of "smart quotes" 2021-07-15 06:31:24 -06:00
arch x86/fpu: Fix AMD X86_BUG_FXSAVE_LEAK fixup 2024-07-05 09:14:43 +02:00
block block/ioctl: prefer different overflow check 2024-07-05 09:14:25 +02:00
certs certs/blacklist_hashes.c: fix const confusion in certs blacklist 2022-06-22 14:22:01 +02:00
crypto crypto: ecrdsa - Fix module auto-load on add_key 2024-06-16 13:39:58 +02:00
drivers vduse: Temporarily fail if control queue feature requested 2024-07-05 09:14:42 +02:00
fs cifs: fix typo in module parameter enable_gcm_256 2024-07-05 09:14:40 +02:00
include bpf: Take return from set_memory_ro() into account with bpf_prog_lock_ro() 2024-07-05 09:14:42 +02:00
init init/main.c: Fix potential static_command_line memory overflow 2024-04-27 17:05:28 +02:00
io_uring io_uring: fail NOP if non-zero op flags is passed in 2024-06-16 13:39:53 +02:00
ipc ipc/sem: Fix dangling sem_array access in semtimedop race 2022-12-08 11:28:45 +01:00
kernel bpf: Take return from set_memory_ro() into account with bpf_prog_lock_ro() 2024-07-05 09:14:42 +02:00
lib mm/slub, kunit: Use inverted data to corrupt kmem cache 2024-06-16 13:39:16 +02:00
mm mm/huge_memory: don't unpoison huge_zero_folio 2024-07-05 09:14:22 +02:00
net netfilter: nf_tables: fully validate NFT_DATA_VALUE on store to data registers 2024-07-05 09:14:42 +02:00
samples samples/hw_breakpoint: fix building without module unloading 2023-09-23 11:10:01 +02:00
scripts scripts/gdb: fix SB_* constants parsing 2024-06-16 13:39:54 +02:00
security KEYS: trusted: Do not use WARN when encode fails 2024-05-25 16:20:18 +02:00
sound ASoC: fsl-asoc-card: set priv->pdev before using it 2024-07-05 09:14:40 +02:00
tools perf script: Show also errors for --insn-trace option 2024-07-05 09:14:35 +02:00
usr usr/include/Makefile: add linux/nfc.h to the compile-test coverage 2022-02-01 17:27:15 +01:00
virt KVM: Always flush async #PF workqueue when vCPU is being destroyed 2024-04-10 16:18:34 +02:00
.clang-format clang-format: Update with the latest for_each macro list 2021-05-12 23:32:39 +02:00
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore .gitignore: ignore only top-level modules.builtin 2021-05-02 00:43:35 +09:00
.mailmap mailmap: add Andrej Shadura 2021-10-18 20:22:03 -10:00
COPYING
CREDITS MAINTAINERS: Move Daniel Drake to credits 2021-09-21 08:34:58 +03:00
Kbuild
Kconfig
MAINTAINERS trace: Relocate event helper files 2024-04-10 16:19:24 +02:00
Makefile kbuild: Remove support for Clang's ThinLTO caching 2024-07-05 09:14:23 +02:00
README

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.

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.