diff options
| author | Zelin Deng <[email protected]> | 2021-09-29 05:13:49 +0000 |
|---|---|---|
| committer | Paolo Bonzini <[email protected]> | 2021-09-30 08:08:15 +0000 |
| commit | 773e89ab0056aaa2baa1ffd9f044551654410104 (patch) | |
| tree | 21f02e8fab3cd99d60b240830e0b7e2897ada3df /scripts/gcc-plugins/gcc-generate-rtl-pass.h | |
| parent | x86/kvmclock: Move this_cpu_pvti into kvmclock.h (diff) | |
| download | kernel-773e89ab0056aaa2baa1ffd9f044551654410104.tar.gz kernel-773e89ab0056aaa2baa1ffd9f044551654410104.zip | |
ptp: Fix ptp_kvm_getcrosststamp issue for x86 ptp_kvm
hv_clock is preallocated to have only HVC_BOOT_ARRAY_SIZE (64) elements;
if the PTP_SYS_OFFSET_PRECISE ioctl is executed on vCPUs whose index is
64 of higher, retrieving the struct pvclock_vcpu_time_info pointer with
"src = &hv_clock[cpu].pvti" will result in an out-of-bounds access and
a wild pointer. Change it to "this_cpu_pvti()" which is guaranteed to
be valid.
Fixes: 95a3d4454bb1 ("Switch kvmclock data to a PER_CPU variable")
Signed-off-by: Zelin Deng <[email protected]>
Cc: <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
Diffstat (limited to 'scripts/gcc-plugins/gcc-generate-rtl-pass.h')
0 files changed, 0 insertions, 0 deletions
