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

Introduce inline wrappers as required and add direct calls to
block_lock_speculation() in order to prevent speculation into the rwlock
protected critical regions.

Note the rwlock primitives are adjusted to use the non speculation safe variants
of the spinlock handlers, as a speculation barrier is added in the rwlock
calling wrappers.

trylock variants are protected by using lock_evaluate_nospec().

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