* Fix user-space data loss with MADV_FREE and THP

* Fix set_memory oopses
  * Fix addition of large constants in mul_u64_add_u64_div_u64()
  * Fix FineIBT hash offset in cfi_get_func_hash()
  * Fix PCI device reference counting in amd_smn_init()
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEV76QKkVc4xCGURexaDWVMHDJkrAFAmqnKVYACgkQaDWVMHDJ
 krD8aQ/+N/I3Rwg4i54HAMtClEZQl8xZKGkuihie48vPTO5wbuJJUMWRRi5IlSMT
 oBRv2whRzXq9qwL0E0ZIt5S80f1K0ghnY8yLfmnhGDC+OdJrBa6do8g38WjGJueI
 lG6CUm+rnXq7aOCnvFpjEFULS5YClZK8P8kEGe1AplKa1dnlGRGOqq85YUzTWQ1Z
 Umg/HzAi0Bmj9zeoYxP6AMRTBhay5D3IgLow5htodbGb4QGZ+kNlCVMAljm97EkJ
 HdLKbuRe5Kf9mY4rPfHeW55WlwzWdJzVs6k3opsfvb14JpUv73OrlcPEW0mK+sxr
 PGbVylkmhKke2K3SQLo3Yu22SUzBT0Nzimcxn8BzCjq8PE1XTLe+11ZpnMH29RNR
 RCUujHYwIs++6R0812T2yqaK9JfgJl0RZYeABSv6WgZfloknBhUgb4GB8+UVWv5L
 HX5bnqF86uBk58v/x1lqxNzx0UEuny1MXKS/wVvnVo9RU8JeuAa7TvNAKd67i6Pp
 esrB97Y6+XgwquBVvlQW7v3mmU2zauHO4NGfZr8JQPYOXoUbIDwNGZBk2I/HQdb1
 6NZjzYMqbwA0aqvNASRWIG5QlMeR1d7aOgGlXtDw/78yo+f+U5vBD0RMEk7YYPYz
 MbLtwltlVJ+ZZND1BsvT5rnyTcHs3aKdSnCya9jigAAHQcsRh8E=
 =0n23
 -----END PGP SIGNATURE-----

Merge tag 'x86_urgent_for_7.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 fixes from Dave Hansen:
 "The most notable fix is THP not silently losing user data and having
  been around for a couple of years. The main explanation I'd have for
  its longevity is that it requires a few different things to align at
  the same time: MADV_FREE, THP and heavy reclaim.

   - Fix user-space data loss with THP

   - Fix set_memory oopses

   - Fix addition of large constants in mul_u64_add_u64_div_u64()

   - Fix FineIBT hash offset in cfi_get_func_hash()

   - Fix PCI device reference counting in amd_smn_init()"

* tag 'x86_urgent_for_7.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/amd_node: Fix PCI device reference counting in amd_smn_init()
  x86/div64: Fix addition of large constants in mul_u64_add_u64_div_u64()
  x86/cfi: Fix FineIBT hash offset in cfi_get_func_hash()
  x86/mm: Fix user-space data loss with MADV_FREE and THP
  x86/mm/pat: Allocate split page tables as kernel page tables
  x86/alternatives: Exclude text poking against change_page_attr()
  x86/mm/pat: Acquire init_mm read lock on attribute changes to avoid UAF
  x86/mm/pat: Acquire init_mm write lock on collapse to avoid UAF
This commit is contained in:
Linus Torvalds 2026-09-13 17:50:28 -07:00
commit 704340f1cd
6 changed files with 121 additions and 55 deletions