Commit 8d2aec3
committed
KVM: x86: use u64_to_user_ptr()
There is no danger to the kernel if 32-bit userspace provides a 64-bit
value that has the high bits set, but for whatever reason happens to
resolve to an address that has something mapped there. KVM uses the
checked version of get_user() and put_user(), so any faults are caught
properly.
Suggested-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-ID: <20240404121327.3107131-4-pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>1 parent 0d7bf5e commit 8d2aec3
1 file changed
Lines changed: 3 additions & 21 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4842 | 4842 | | |
4843 | 4843 | | |
4844 | 4844 | | |
4845 | | - | |
4846 | | - | |
4847 | | - | |
4848 | | - | |
4849 | | - | |
4850 | | - | |
4851 | | - | |
4852 | | - | |
4853 | | - | |
4854 | 4845 | | |
4855 | 4846 | | |
4856 | | - | |
| 4847 | + | |
4857 | 4848 | | |
4858 | 4849 | | |
4859 | 4850 | | |
4860 | 4851 | | |
4861 | | - | |
4862 | | - | |
4863 | | - | |
4864 | 4852 | | |
4865 | 4853 | | |
4866 | 4854 | | |
| |||
5712 | 5700 | | |
5713 | 5701 | | |
5714 | 5702 | | |
5715 | | - | |
| 5703 | + | |
5716 | 5704 | | |
5717 | 5705 | | |
5718 | | - | |
5719 | | - | |
5720 | | - | |
5721 | 5706 | | |
5722 | 5707 | | |
5723 | 5708 | | |
| |||
5735 | 5720 | | |
5736 | 5721 | | |
5737 | 5722 | | |
5738 | | - | |
| 5723 | + | |
5739 | 5724 | | |
5740 | 5725 | | |
5741 | 5726 | | |
5742 | | - | |
5743 | | - | |
5744 | | - | |
5745 | 5727 | | |
5746 | 5728 | | |
5747 | 5729 | | |
| |||
0 commit comments