On 07/09/18 09:55, Jan Beulich wrote:
>>>> On 06.09.18 at 17:21, <andrew.coop...@citrix.com> wrote:
>> On 06/09/18 09:56, Paul Durrant wrote:
>>>> @@ -4390,9 +4411,6 @@ static int hvmop_get_param(
>>>>      if ( copy_from_guest(&a, arg, 1) )
>>>>          return -EFAULT;
>>>>
>>>> -    if ( a.index >= HVM_NR_PARAMS )
>>>> -        return -EINVAL;
>>>> -
>>> ASSERT, just in case someone screws up the allow function in future?
>> That's not going to help in any practical way.  This check does really
>> exist, and is part of the switch statement.
> Which switch() statement? The one in the allow function includes this,
> but the one here simply has
>
>     default:
>         a.value = d->arch.hvm.params[a.index];
>         break;

A boundary check on a.index logically falls within the remit of
hvm_allow_get_param()

~Andrew

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

Reply via email to