[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Fix div by zero in xenvif if no queues.



On 21/03/2022 16:45, Martin Harvey wrote:

-----Original Message-----
From: win-pv-devel <win-pv-devel-bounces@xxxxxxxxxxxxxxxxxxxx> On Behalf Of 
Durrant, Paul

It really should not happen at all.

I also notice, with some trepidation, that FrontendSetNumQueues does:

     status = XENBUS_STORE(Read,
                           &Frontend->StoreInterface,
                           NULL,
                           __FrontendGetBackendPath(Frontend),
                           "multi-queue-max-queues",
                           &Buffer);
     if (NT_SUCCESS(status)) {
         BackendMaxQueues = (ULONG)strtoul(Buffer, NULL, 10);

So in the case where the contents of our xenstore buffer is not an integer, 
we'll set backend max queues (and hence frontend max queues) to zero, without 
so much of a whimper of an error, so that prob needs to be sorted too.


I really wouldn't go down that rathole. If the frontend cannot implicitly trust its backend (or the toolstack that creates it) then all bets are off IMO.

  Paul


MH.




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.