[openib-general] [PATCH] validate MADs issued from userspace for spec compliance C13-18.1.1

Sean Hefty mshefty at ichips.intel.com
Tue Jul 11 15:55:54 PDT 2006


Sean Hefty wrote:
> @@ -438,6 +493,11 @@ static ssize_t ib_umad_write(struct file
>  		copy_offset = IB_MGMT_RMPP_HDR;
>  		rmpp_active = ib_get_rmpp_flags(&rmpp_mad->rmpp_hdr) &
>  			      IB_MGMT_RMPP_FLAG_ACTIVE;
> +		if (rmpp_active &&
> +		    rmpp_mad->rmpp_hdr.rmpp_type != IB_MGMT_RMPP_TYPE_DATA) {
> +			ret = -EINVAL;
> +			goto err_ah;
> +		}

It appears that this check results in discarding RMPP responses from openSM. 
For now, I'm going to remove this check from the patch.  (My testing seems to 
work fine then.)

Other issues that I've been running into appear to be related to a combination 
of timing issues running the tests too quickly after starting opensm and running 
multiple copies of opensm on different systems.

- Sean




More information about the general mailing list