diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2026-10-20 10:02:53 -1000 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2026-10-20 10:13:49 -1000 |
| commit | a79bb50808a58482eaf39d8e15fbc388cbea3a74 (patch) | |
| tree | b7bb1a516f126c311e28a9b0f7c9208bd009c938 /scripts/Makefile.thinlto | |
| parent | 05b163dab2bca452ef61e6ee6b12183c67f01aca (diff) | |
| download | linux-a79bb50808a58482eaf39d8e15fbc388cbea3a74.tar.gz linux-a79bb50808a58482eaf39d8e15fbc388cbea3a74.zip | |
KVM: PPC: Book3S HV: use get_user()/put_user() for the HPT fd
kvm_htab_read() and kvm_htab_write() check the user buffer with
access_ok() once and then move each HPT entry with two __put_user() or
__get_user() calls, with real work between entries. Each of those
accesses opens and closes user access on its own, so the up-front check
saves nothing.
Use put_user() and get_user(). On powerpc the only difference is the
address check: __get_user() and __put_user() already do might_fault().
kvm_htab_write() holds mmu_setup_lock across the loop, but it already
reads each header with __copy_from_user() under that lock, so nothing
new happens under it. The access_ok() calls stay.
This is part of getting rid of __get_user() and __put_user() entirely.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
