[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH V3] x86/altp2m: Hypercall to set altp2m view visibility
On 19.02.2020 10:18, Alexandru Stefan ISAILA wrote: > @@ -4835,6 +4836,23 @@ static int do_altp2m_op( > break; > } > > + case HVMOP_altp2m_set_visibility: > + { > + uint16_t altp2m_idx = a.u.set_visibility.altp2m_idx; > + > + if ( a.u.set_visibility.pad ) > + rc = -EINVAL; > + else if ( !altp2m_active(d) ) > + rc = -EOPNOTSUPP; > + else if ( a.u.set_visibility.visible ) > + d->arch.altp2m_working_eptp[altp2m_idx] = > + d->arch.altp2m_eptp[altp2m_idx]; > + else > + d->arch.altp2m_working_eptp[altp2m_idx] = > + mfn_x(INVALID_MFN); Don't you need to bounds check the index before its use? And shouldn't you return an error also for in-range ones which aren't actually valid? Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |