lkml.org 
[lkml]   [2020]   [Jun]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: [PATCH v2 1/3] Drivers: hv: vmbus: Add vmbus_requestor data structure for VMBus hardening
    On Mon, Jun 29, 2020 at 5:56 PM Michael Kelley <mikelley@microsoft.com> wrote:
    > I'm not understanding the problem here. Any VMbus driver that uses
    > this requestID allocation mechanism must set newchannel->rqstor_size
    > to a non-zero value. But if a VMbus driver doesn't use the mechanism,
    > then newchannel->rqstor_size will default to zero, and the mechanism
    > will not be initialized for the channels used by that driver. I think the
    > cleanup of the mechanism handles the case where it wasn't ever
    > initialized. Or am I missing something?
    >
    > Michael

    Yes, that is correct. I think the validation is necessary if there
    exists an instance
    where a driver call vmbus_next_request_id or vmbus_request_addr() with a rqstor
    that has not been previously initialized. Currently, the rqstor
    pointer is not being
    validated in these 2 functions, because we assume that the driver has
    initialized the
    array with a non-zero value before calling next_id() or request_addr().

    Andres.

    \
     
     \ /
      Last update: 2020-06-30 00:10    [W:4.526 / U:0.072 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site