From: Avi Weiss <thnkslprpt@gmail.com>
To: Jon Mason <jdmason@kudzu.us>
Cc: Dave Jiang <dave.jiang@intel.com>,
Allen Hubbe <allenbh@gmail.com>, Koichiro Den <den@valinux.co.jp>,
Frank Li <Frank.Li@nxp.com>,
ntb@lists.linux.dev, linux-kernel@vger.kernel.org,
Avi Weiss <thnkslprpt@gmail.com>
Subject: [PATCH v2 0/2] NTB: epf: serialize MW setup and report reliable errors
Date: Sun, 1 Nov 2026 15:57:04 +0200 [thread overview]
Message-ID: <cover.1793540847.git.thnkslprpt@gmail.com> (raw)
This series fixes two related NTB EPF memory-window issues.
The first patch serializes shared MW parameter writes with command
submission, preventing concurrent setups from using each other's
DMA addresses.
The second patch propagates definite endpoint command errors while
completion status can still be associated with the current command.
Changes since v1:
- koichiro pointed out that an endpoint may complete CONFIGURE_MW after
the host times out. Propagating -ETIMEDOUT can cause clients to free
DMA memory while the endpoint is still configuring the mapping.
Returning success only for the timed-out command avoids that immediate
regression, but was insufficient in the end b/c a late error from
command A may be observed during command B. Returning that stale error
can cause B's buffer to be freed before B completes.
The second patch records whether any command has timed out and
preserves the original MW return behavior thereafter.
The first patch also prevents a pre-timeout regression: without
parameter serialization, propagating an explicit rejection from one
setup can release memory referenced by another concurrent setup.
v1: https://lists.openwall.net/linux-kernel/2026/10/27/2144
Review: https://lists.openwall.net/linux-kernel/2026/10/28/466
Avi Weiss (2):
NTB: epf: serialize memory window parameter writes
NTB: epf: propagate MW command errors while status is reliable
drivers/ntb/hw/epf/ntb_hw_epf.c | 37 ++++++++++++++++++++++++++-------
1 file changed, 29 insertions(+), 8 deletions(-)
base-commit: cbbddb6b08cc9900a87cccaa9b22bbe06aa4f50a
--
2.43.0
next reply other threads:[~2026-11-01 13:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-01 13:57 Avi Weiss [this message]
2026-11-01 13:57 ` [PATCH v2 1/2] NTB: epf: serialize memory window parameter writes Avi Weiss
2026-11-01 15:53 ` Koichiro Den
2026-11-01 13:57 ` [PATCH v2 2/2] NTB: epf: propagate MW command errors while status is reliable Avi Weiss
2026-11-01 15:56 ` Koichiro Den
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=cover.1793540847.git.thnkslprpt@gmail.com \
--to=thnkslprpt@gmail.com \
--cc=Frank.Li@nxp.com \
--cc=allenbh@gmail.com \
--cc=dave.jiang@intel.com \
--cc=den@valinux.co.jp \
--cc=jdmason@kudzu.us \
--cc=linux-kernel@vger.kernel.org \
--cc=ntb@lists.linux.dev \
/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
all inboxes | Powered by JetHome®