[ofw] [RFC] [PATCH 11/12] winverbs\uvp:add poll_cq_array() tointerface

Fab Tillier ftillier at windows.microsoft.com
Sat Mar 15 10:45:22 PDT 2008


Looking at the code, right now it returns the version that it filled in.  Nobody checks the return, and it's not told what version is requested.  I'd probably consider this a bug - the version should be set by the caller, and the callee should return the requested version.

-Fab

-----Original Message-----
From: Sean Hefty [mailto:sean.hefty at intel.com]
Sent: Saturday, March 15, 2008 10:40 AM
To: Fab Tillier; ofw at lists.openfabrics.org
Subject: RE: [ofw] [RFC] [PATCH 11/12] winverbs\uvp:add poll_cq_array() tointerface

>Applications never use this directly, it's an internal interface used by IBAL,
>the ND provider, and now WinVerbs.  You have to recompile anyone using the UVP
>interface if this structure ever changes, since the UVP will fill it as if it
>was whatever it was compiled with.  That is, winverbs won't be able to work
>with an old UVP that doesn't fill in this function, and IBAL won't be able to
>work with a newer UVP that expect to fill it in since it would overflow the
>interface buffer provided by IBAL.
>
>If the UVP checked the input version (and it was provided by callers) you might
>have some hope of handling things properly.  For the time being, you just have
>to recompile everything.

An application could be using this directly, similar to how WV does.  But,
you're right, it would cause a problem with buffer overflow.  Is the version
field in the uvp_interface_t used as input to the UVP?  What sort of versioning
is done by the UVP?

- Sean




More information about the ofw mailing list