RE: [PATCH V1 for-next 3/4] IB/core: Make sure that the PSN does not overflow

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

 



> > >>@@ -860,6 +860,12 @@ int ib_modify_qp_is_ok(enum ib_qp_state
> cur_state, enum ib_qp_state next_state,
> > >>  	if (mask & ~(req_param | opt_param | IB_QP_STATE))
> > >>  		return 0;
> > >>+	if ((mask & IB_QP_SQ_PSN) && (attr->sq_psn & 0xff000000))
> > >>+		return 0;
> > >>+
> > >>+	if ((mask & IB_QP_RQ_PSN) && (attr->rq_psn & 0xff000000))
> > >>+		return 0;
> > >>+
> 
> > >And since rdmacm has had this longstanding bug of generating > 24
> > >bit PSNs, this change seems really scary - very likely to break
> > >working systems.
> 
> > By IBTA the HW can only use 24 bits, also the IB CM also makes sure
> > to only encode/decode 24 PSN bits to/from the wire (see the PSN
> > related helpers in drivers/infiniband/core/cm_msgs.h), so in that
> > respect, I don't see what other bits which are not 24 bits out of
> > the 32 generated ones could be of some use to existing applications,
> > please clarify.
> 
> Maybe you can explain why this check is suddenly important now? It
> seems risky with no rational?

To add to this, there's a difference between the code ignoring the upper 8-bits, versus mandating that they be 0.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux