linux-stable/Documentation
Linus Torvalds 1423e2660c Fixes and improvements for FPU handling on x86:
- Prevent sigaltstack out of bounds writes. The kernel unconditionally
     writes the FPU state to the alternate stack without checking whether
     the stack is large enough to accomodate it.
 
     Check the alternate stack size before doing so and in case it's too
     small force a SIGSEGV instead of silently corrupting user space data.
 
   - MINSIGSTKZ and SIGSTKSZ are constants in signal.h and have never been
     updated despite the fact that the FPU state which is stored on the
     signal stack has grown over time which causes trouble in the field
     when AVX512 is available on a CPU. The kernel does not expose the
     minimum requirements for the alternate stack size depending on the
     available and enabled CPU features.
 
     ARM already added an aux vector AT_MINSIGSTKSZ for the same reason.
     Add it to x86 as well
 
   - A major cleanup of the x86 FPU code. The recent discoveries of XSTATE
     related issues unearthed quite some inconsistencies, duplicated code
     and other issues.
 
     The fine granular overhaul addresses this, makes the code more robust
     and maintainable, which allows to integrate upcoming XSTATE related
     features in sane ways.
 -----BEGIN PGP SIGNATURE-----
 
 iQJHBAABCgAxFiEEQp8+kY+LLUocC4bMphj1TA10mKEFAmDlcpETHHRnbHhAbGlu
 dXRyb25peC5kZQAKCRCmGPVMDXSYoeP5D/4i+AgYYeiMLgGb+NS7iaKPfoWo6LIz
 y3qdTSA0DQaIYbYivWwRO/g0GYdDMXDWeZalFi7eGnVI8O3eOog+22Zrf/y0UINB
 KJHdYd4ApWHhs401022y5hexrWQvnV8w1yQCuj/zLm6eC+AVhdwt2AY+IBoRrdUj
 wqY97B/4rJNsBvvqTDn9EeDrJA2y0y0Suc7AhIp2BGMI+dpIdxys8RJDamXNWyDL
 gJf0YRgUoiIn3AHKb+fgv60AoxfC175NSg/5/y/scFNXqVlW0Up4YCb7pqG9o2Ga
 f3XvtWfbw1N5PmUYjFkALwEkzGUbM3v0RA3xLY2j2WlWm9fBPPy59dt+i/h/VKyA
 GrA7i7lcIqX8dfVH6XkrReZBkRDSB6t9SZTvV54jAz5fcIZO2Rg++UFUvI/R6GKK
 XCcxukYaArwo+IG62iqDszS3gfLGhcor/cviOeULRC5zMUIO4Jah+IhDnifmShtC
 M5s9QzrwIRD/XMewGRQmvkiN4kBfE7jFoBQr1J9leCXJKrM+2JQmMzVInuubTQIq
 SdlKOaAIn7xtekz+6XdFG9Gmhck0PCLMJMOLNvQkKWI3KqGLRZ+dAWKK0vsCizAx
 0BA7ZeB9w9lFT+D8mQCX77JvW9+VNwyfwIOLIrJRHk3VqVpS5qvoiFTLGJJBdZx4
 /TbbRZu7nXDN2w==
 =Mq1m
 -----END PGP SIGNATURE-----

Merge tag 'x86-fpu-2021-07-07' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 fpu updates from Thomas Gleixner:
 "Fixes and improvements for FPU handling on x86:

   - Prevent sigaltstack out of bounds writes.

     The kernel unconditionally writes the FPU state to the alternate
     stack without checking whether the stack is large enough to
     accomodate it.

     Check the alternate stack size before doing so and in case it's too
     small force a SIGSEGV instead of silently corrupting user space
     data.

   - MINSIGSTKZ and SIGSTKSZ are constants in signal.h and have never
     been updated despite the fact that the FPU state which is stored on
     the signal stack has grown over time which causes trouble in the
     field when AVX512 is available on a CPU. The kernel does not expose
     the minimum requirements for the alternate stack size depending on
     the available and enabled CPU features.

     ARM already added an aux vector AT_MINSIGSTKSZ for the same reason.
     Add it to x86 as well.

   - A major cleanup of the x86 FPU code. The recent discoveries of
     XSTATE related issues unearthed quite some inconsistencies,
     duplicated code and other issues.

     The fine granular overhaul addresses this, makes the code more
     robust and maintainable, which allows to integrate upcoming XSTATE
     related features in sane ways"

* tag 'x86-fpu-2021-07-07' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (74 commits)
  x86/fpu/xstate: Clear xstate header in copy_xstate_to_uabi_buf() again
  x86/fpu/signal: Let xrstor handle the features to init
  x86/fpu/signal: Handle #PF in the direct restore path
  x86/fpu: Return proper error codes from user access functions
  x86/fpu/signal: Split out the direct restore code
  x86/fpu/signal: Sanitize copy_user_to_fpregs_zeroing()
  x86/fpu/signal: Sanitize the xstate check on sigframe
  x86/fpu/signal: Remove the legacy alignment check
  x86/fpu/signal: Move initial checks into fpu__restore_sig()
  x86/fpu: Mark init_fpstate __ro_after_init
  x86/pkru: Remove xstate fiddling from write_pkru()
  x86/fpu: Don't store PKRU in xstate in fpu_reset_fpstate()
  x86/fpu: Remove PKRU handling from switch_fpu_finish()
  x86/fpu: Mask PKRU from kernel XRSTOR[S] operations
  x86/fpu: Hook up PKRU into ptrace()
  x86/fpu: Add PKRU storage outside of task XSAVE buffer
  x86/fpu: Dont restore PKRU in fpregs_restore_userspace()
  x86/fpu: Rename xfeatures_mask_user() to xfeatures_mask_uabi()
  x86/fpu: Move FXSAVE_LEAK quirk info __copy_kernel_to_fpregs()
  x86/fpu: Rename __fpregs_load_activate() to fpregs_restore_userregs()
  ...
2021-07-07 11:12:01 -07:00
..
ABI USB / Thunderbolt patches for 5.14-rc1 2021-07-05 14:16:22 -07:00
PCI docs: PCI: pci.rst: avoid using ReST :doc:`foo` markup 2021-06-17 13:24:38 -06:00
RCU Merge branch 'core-rcu-2021.07.04' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu 2021-07-04 12:58:33 -07:00
accounting delayacct: Add sysctl to enable at runtime 2021-05-12 11:43:25 +02:00
admin-guide USB / Thunderbolt patches for 5.14-rc1 2021-07-05 14:16:22 -07:00
arm docs: Fix typo in Documentation/arm/marvell.rst 2021-06-04 11:28:36 -06:00
arm64 arm64: Document requirement for access to FEAT_HCX 2021-05-25 19:05:28 +01:00
block for-5.14/block-2021-06-29 2021-06-30 12:12:56 -07:00
bpf Networking changes for 5.14. 2021-06-30 15:51:09 -07:00
cdrom docs: cdrom-standard.rst: get rid of uneeded UTF-8 chars 2021-05-11 11:00:17 -06:00
core-api Merge branch 'akpm' (patches from Andrew) 2021-07-02 12:08:10 -07:00
cpu-freq
crypto
dev-tools Merge branch 'kcsan.2021.05.18a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu 2021-07-04 12:29:16 -07:00
devicetree hwspinlock updates for v5.14 2021-07-07 10:57:51 -07:00
doc-guide docs: doc-guide: avoid using ReST :doc:`foo` markup 2021-06-17 13:24:37 -06:00
driver-api USB / Thunderbolt patches for 5.14-rc1 2021-07-05 14:16:22 -07:00
fault-injection docs: fault-injection: fix non-working usage of negative values 2021-06-14 15:58:22 -06:00
fb
features powerpc updates for 5.13 2021-04-30 12:22:28 -07:00
filesystems Driver core changes for 5.14-rc1 2021-07-05 13:51:41 -07:00
firmware-guide Networking changes for 5.14. 2021-06-30 15:51:09 -07:00
firmware_class
fpga Documentation: fpga: dfl: change FPGA indirect article to an 2021-06-09 14:51:25 +02:00
gpu drm/amd/display: Add Freesync video documentation 2021-06-18 17:06:43 -04:00
hid
hwmon hwmon: (pmbus) Add driver for Delta DPS-920AB PSU 2021-06-17 04:21:46 -07:00
i2c Merge branch 'i2c/for-mergewindow' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux 2021-07-04 11:47:18 -07:00
ia64
ide
iio
infiniband
input docs: networking: Replace strncpy() with strscpy() 2021-06-04 11:21:43 -06:00
isdn
kbuild Kconfig updates for v5.13 2021-04-29 14:32:00 -07:00
kernel-hacking docs: kernel-hacking: hacking.rst: avoid using ReST :doc:`foo` markup 2021-06-17 13:24:38 -06:00
leds
litmus-tests
livepatch
locking locking/lockdep,doc: Improve readability of the block matrix 2021-05-31 10:14:54 +02:00
m68k
maintainer
mhi
mips
misc-devices
netlabel
networking TTY / Serial patches for 5.14-rc1 2021-07-05 14:08:24 -07:00
nios2
nvdimm
openrisc
parisc
pcmcia
power PM: runtime: Clarify documentation when callbacks are unassigned 2021-06-11 19:04:07 +02:00
powerpc powerpc/64s/syscall: Use pt_regs.trap to distinguish syscall ABI difference between sc and scv syscalls 2021-05-21 00:58:03 +10:00
process docs: process: submitting-patches.rst: avoid using ReST :doc:`foo` markup 2021-06-17 13:24:38 -06:00
riscv riscv: Ensure BPF_JIT_REGION_START aligned with PMD size 2021-06-18 21:10:05 -07:00
s390 vfio/mdev: Remove CONFIG_VFIO_MDEV_DEVICE 2021-06-21 15:29:25 -06:00
scheduler This was a reasonably active cycle for documentation; this pull includes: 2021-06-28 16:53:05 -07:00
scsi scsi: core: Kill message byte 2021-05-31 22:48:24 -04:00
security This was a reasonably active cycle for documentation; this pull includes: 2021-06-28 16:53:05 -07:00
sh
sound ASoC: Updates for v5.14 2021-07-01 08:36:12 +02:00
sparc
sphinx
sphinx-static
spi spi: pxa2xx: Update documentation to point out that it's outdated 2021-05-18 14:05:36 +01:00
staging
target
timers Documentation: drop optional BOMs 2021-05-10 15:17:34 -06:00
trace Tracing updates for 5.14: 2021-07-03 11:13:22 -07:00
translations docs/zh_CN: add translations in zh_CN/dev-tools/kasan 2021-06-04 11:20:03 -06:00
usb USB / Thunderbolt patches for 5.14-rc1 2021-07-05 14:16:22 -07:00
userspace-api Char / Misc driver updates for 5.14-rc1 2021-07-05 13:42:16 -07:00
virt This was a reasonably active cycle for documentation; this pull includes: 2021-06-28 16:53:05 -07:00
vm Merge branch 'akpm' (patches from Andrew) 2021-07-02 12:08:10 -07:00
w1 w1: fix build warning in w1_ds2438.rst 2021-05-26 09:11:24 +02:00
watchdog
x86 Fixes and improvements for FPU handling on x86: 2021-07-07 11:12:01 -07:00
xtensa
.gitignore
COPYING-logo
Changes
CodingStyle
Kconfig
Makefile docs: Makefile: Use CONFIG_SHELL not SHELL 2021-06-18 11:26:08 -06:00
SubmittingPatches
arch.rst
asm-annotations.rst
atomic_bitops.txt
atomic_t.txt
conf.py docs: Take a little noise out of the build process 2021-06-17 13:49:18 -06:00
docutils.conf
dontdiff
index.rst
logo.gif
memory-barriers.txt
watch_queue.rst