]> xenbits.xensource.com Git - xen.git/commit
percpu-rwlock: introduce support for blocking speculation into critical regions
authorRoger Pau Monné <roger.pau@citrix.com>
Tue, 13 Feb 2024 16:57:38 +0000 (17:57 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 12 Mar 2024 15:50:04 +0000 (15:50 +0000)
commitf218daf6d3a3b847736d37c6a6b76031a0d08441
treec338ff2d53a8419b69b27c4cb6a27ed88bca316e
parenta1fb15f61692b1fa9945fc51f55471ace49cdd59
percpu-rwlock: introduce support for blocking speculation into critical regions

Add direct calls to block_lock_speculation() where required in order to prevent
speculation into the lock protected critical regions.  Also convert
_percpu_read_lock() from inline to always_inline.

Note that _percpu_write_lock() has been modified the use the non speculation
safe of the locking primites, as a speculation is added unconditionally by the
calling wrapper.

This is part of XSA-453 / CVE-2024-2193

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/common/rwlock.c
xen/include/xen/rwlock.h