diff options
author | David Matlack <dmatlack@google.com> | 2023-10-27 10:26:38 -0700 |
---|---|---|
committer | Sean Christopherson <seanjc@google.com> | 2023-12-01 07:51:55 -0800 |
commit | 1aa4bb916808503bf6fedd00f50f2077f91cebaa (patch) | |
tree | 134ef53022e7f3f5eadf7f148d55be0b346fb3bb /tools/testing/selftests/bpf/prog_tests/sockmap_basic.c | |
parent | e9e60c82fe391d04db55a91c733df4a017c28b2f (diff) |
KVM: x86/mmu: Fix off-by-1 when splitting huge pages during CLEAR
Fix an off-by-1 error when passing in the range of pages to
kvm_mmu_try_split_huge_pages() during CLEAR_DIRTY_LOG. Specifically, end
is the last page that needs to be split (inclusive) so pass in `end + 1`
since kvm_mmu_try_split_huge_pages() expects the `end` to be
non-inclusive.
At worst this will cause a huge page to be write-protected instead of
eagerly split, which is purely a performance issue, not a correctness
issue. But even that is unlikely as it would require userspace pass in a
bitmap where the last page is the only 4K page on a huge page that needs
to be split.
Reported-by: Vipin Sharma <vipinsh@google.com>
Fixes: cb00a70bd4b7 ("KVM: x86/mmu: Split huge pages mapped by the TDP MMU during KVM_CLEAR_DIRTY_LOG")
Signed-off-by: David Matlack <dmatlack@google.com>
Link: https://lore.kernel.org/r/20231027172640.2335197-2-dmatlack@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/sockmap_basic.c')
0 files changed, 0 insertions, 0 deletions