diff options
| author | 2026-04-13 17:05:26 +0800 | |
|---|---|---|
| committer | 2026-11-02 09:06:59 -0500 | |
| commit | fe812fd89636f30adf77147e168ec8240ae345c1 (patch) | |
| tree | 9e1d9448c73a68847368c322f49172bc91c83e24 /scripts/Makefile.thinlto | |
| parent | vhost-scsi: do not relock event vq mutex on send_evt fallback (diff) | |
vhost/vringh: Fix IOTLB permission in putu16_iotlb()
putu16_iotlb() performs a write operation (__put_user / WRITE_ONCE)
but requests IOTLB translation with VHOST_MAP_RO (read-only
permission). This means the IOTLB lookup succeeds only if the page
has read permission, ignoring write permission entirely. A page
mapped read-only in the IOTLB would incorrectly allow the write,
while a page mapped write-only would incorrectly deny it.
The neighbouring getu16_iotlb() correctly uses VHOST_MAP_RO for its
read operation, and the copydesc write path (putdesc_iotlb) correctly
uses VHOST_MAP_WO, confirming this is a copy-paste error.
Fix by changing VHOST_MAP_RO to VHOST_MAP_WO to match the write
semantics of putu16_iotlb().
Fixes: 0ea9ee430111 ("vhost/vringh: add IOTLB support")
Signed-off-by: Dudu Lu <phx0fer@gmail.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Message-ID: <20260413090526.80563-1-phx0fer@gmail.com>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
