Re: [PATCH for-next v3 0/3] Fix memory ordering errors in queues

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

 



On Thu, May 27, 2021 at 02:47:45PM -0500, Bob Pearson wrote:
> These patches optimize the memory ordering in rxe_queue.h so
> that user space and not kernel space indices are protected for loads
> with smp_load_acquire() and stores with smp_store_release(). The
> original implementation of this did not apply to all index references
> which has recently caused test case errors traced to stale memory loads.
> These patches fix those errors and also protect kernel indices from
> malicious modification by user space.
> 
> Reported-by: Zhu Yanjun <zyjzyj2000@xxxxxxxxx>
> Fixes: d21a1240f516 ("RDMA/rxe: Use acquire/release for memory ordering")
> Signed-off-by: Bob Pearson <rpearsonhpe@xxxxxxxxx>
> ---
> v3:
>   Protected kernel index in shared queues from modification by user space.
>   Pass queue type to allow compiler to optimize queue methods.
> v2:
>   Add a way to distinguish between user and kernel indices.
> v1:
>   Add missing smp_load_acquire() calls.
> ---
> Bob Pearson (3):
>   RDMA/rxe: Add a type flag to rxe_queue structs
>   RDMA/rxe: Protect user space index loads/stores
>   RDMA/rxe: Protext kernel index from user space

Applied to for-next, thanks

Jason



[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