diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2026-10-19 19:24:08 -1000 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2026-10-20 08:06:57 -1000 |
| commit | 95a214f31a3b1ef40034f1e1cb3b9d758a374f01 (patch) | |
| tree | 1cdea66ee724471199c51a6f053aa585f6ca06aa /scripts/Makefile.thinlto | |
| parent | 05fb07c40e0013ba5ae373c6ea1bcc622eaea7f0 (diff) | |
| download | linux-95a214f31a3b1ef40034f1e1cb3b9d758a374f01.tar.gz linux-95a214f31a3b1ef40034f1e1cb3b9d758a374f01.zip | |
vhost: vringh: use get_user()/put_user() for IOTLB 16-bit accesses
getu16_iotlb() and putu16_iotlb() use __get_user() and __put_user() when
the IOTLB maps to user virtual addresses. Nothing nearby checks the
translated address: that relies on the mapping having been validated
against the user's VMAs when it was set up.
Use get_user() and put_user(), which do the same single, untorn access
and also check the address. The only atomic-context use, the vdpa
simulators' notification check, now disables page faults around it, so
the might_fault() in the checked accessors stays quiet there.
This is part of getting rid of __get_user() and __put_user() entirely.
Tested-and-acked-by: Michael S. Tsirkin <mst@redhat.com>
Fixes: 42823a871fd4 ("vringh: support VA with iotlb")
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
