RE: [PATCH for-rc] IB/rdmavt: Validate remote_addr during loopback atomic tests

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

 



> From: Haakon Bugge <haakon.bugge@xxxxxxxxxx>
> Sent: Monday, January 24, 2022 7:44 AM
> To: Leon Romanovsky <leon@xxxxxxxxxx>
> Cc: Marciniszyn, Mike <mike.marciniszyn@xxxxxxxxxxxxxxxxxxxx>;
> jgg@xxxxxxxx; OFED mailing list <linux-rdma@xxxxxxxxxxxxxxx>
> Subject: Re: [PATCH for-rc] IB/rdmavt: Validate remote_addr during
> loopback atomic tests
> > And is IBTA restriction applicable to hfi1?
> 
> For hfi1, I do not know. But this fix was in drivers/infiniband/sw/rdmavt, for
> which the first commit message states:
> 
>  This patch introduces the basics for a new module called rdma_vt. This new
>     driver is a software implementation of the InfiniBand verbs...
> 
> 
> More importantly, the check we discuss is not about being page-aligned, but
> about being naturally aligned, right?
> 

Hardware supported by rdamvt strives to be 100% compatible with the verbs API.

And yes, the natural alignment is the objective for the test.

According to the IB Spec (V1-Rel1.2.1 section 9.4.5 ATOMIC OPERATIONS):
        "The virtual address in the ATOMIC Command Request packet shall
        be naturally aligned to an 8 byte boundary. The responding CA
        checks this and returns an Invalid Request NAK if it is not naturally
        aligned."

The recent additions to the rdma-core test suite caught this issue.

The test is consistent with input packet parsing:

        case OP(COMPARE_SWAP):
        case OP(FETCH_ADD): {
<snip>
                if (unlikely(vaddr & (sizeof(u64) - 1)))
                        goto nack_inv_unlck;




[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