From: Jason Gunthorpe <jgg@nvidia.com>
To: Bob Pearson <rpearsonhpe@gmail.com>
Cc: zyjzyj2000@gmail.com, linux-rdma@vger.kernel.org
Subject: Re: [PATCH for-next v3 0/3] Fix memory ordering errors in queues
Date: Thu, 3 Jun 2021 15:56:09 -0300 [thread overview]
Message-ID: <20210603185609.GA317370@nvidia.com> (raw)
In-Reply-To: <20210527194748.662636-1-rpearsonhpe@gmail.com>
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@gmail.com>
> Fixes: d21a1240f516 ("RDMA/rxe: Use acquire/release for memory ordering")
> Signed-off-by: Bob Pearson <rpearsonhpe@gmail.com>
> ---
> 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
prev parent reply other threads:[~2021-06-03 18:56 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-27 19:47 [PATCH for-next v3 0/3] Fix memory ordering errors in queues Bob Pearson
2021-05-27 19:47 ` [PATCH for-next v3 1/3] RDMA/rxe: Add a type flag to rxe_queue structs Bob Pearson
2021-05-28 8:31 ` Zhu Yanjun
2021-05-28 14:48 ` Pearson, Robert B
2021-05-27 19:47 ` [PATCH for-next v3 2/3] RDMA/rxe: Protect user space index loads/stores Bob Pearson
2021-05-27 19:47 ` [PATCH for-next v3 3/3] RDMA/rxe: Protext kernel index from user space Bob Pearson
2021-05-28 20:29 ` [PATCH for-next v3 0/3] Fix memory ordering errors in queues Jason Gunthorpe
2021-05-31 7:25 ` Zhu Yanjun
2021-06-03 18:56 ` Jason Gunthorpe [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210603185609.GA317370@nvidia.com \
--to=jgg@nvidia.com \
--cc=linux-rdma@vger.kernel.org \
--cc=rpearsonhpe@gmail.com \
--cc=zyjzyj2000@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox