Commit Graph
6 Commits
Author SHA1 Message Date
Pavan Chebbi 44230bb342 fwctl/bnxt_fwctl: Add documentation entries
Add bnxt_fwctl to the driver and fwctl documentation pages.

Link: https://patch.msgid.link/r/[email protected]
Reviewed-by: Andy Gospodarek <[email protected]>
Reviewed-by: Dave Jiang <[email protected]>
Signed-off-by: Pavan Chebbi <[email protected]>
Signed-off-by: Jason Gunthorpe <[email protected]>
2026-03-31 13:33:55 -03:00
Hanne-Lotta Mäenpää b7833731d1 docs: Improve grammar in Userspace API/fwctl
Fix typos and improve grammar in the documentation for
fwctl subsystem.

Use the word user space consistently, instead of having
two variants (user space vs. userspace).

Change wording of denied behaviour to be disallowed
behaviour when describing the interface.

Reviewed-by: Dave Jiang <[email protected]>
Signed-off-by: Hanne-Lotta Mäenpää <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jonathan Corbet <[email protected]>
2025-06-09 15:11:46 -06:00
Shannon Nelson 4032570706 pds_fwctl: add Documentation entries
Add pds_fwctl to the driver and fwctl documentation pages.

Link: https://patch.msgid.link/r/[email protected]
Reviewed-by: Leon Romanovsky <[email protected]>
Signed-off-by: Shannon Nelson <[email protected]>
Signed-off-by: Jason Gunthorpe <[email protected]>
2025-03-21 20:57:55 -03:00
Dave Jiang 72b24a9d50 fwctl/cxl: Add documentation to FWCTL CXL
Add policy and operational documentation for FWCTL CXL.

Link: https://patch.msgid.link/r/[email protected]
Reviewed-by: Jonathan Cameron <[email protected]>
Reviewed-by: Dan Williams <[email protected]>
Signed-off-by: Dave Jiang <[email protected]>
Signed-off-by: Jason Gunthorpe <[email protected]>
2025-03-17 14:41:37 -03:00
Saeed Mahameed 52929c2142 fwctl/mlx5: Support for communicating with mlx5 fw
mlx5 FW has a built in security context called UID. Each UID has a set of
permissions controlled by the kernel when it is created and every command
is tagged by the kernel with a particular UID. In general commands cannot
reach objects outside of their UID and commands cannot exceed their UID's
permissions. These restrictions are enforced by FW.

This mechanism has long been used in RDMA for the devx interface where
RDMA will sent commands directly to the FW and the UID limitations
restrict those commands to a ib_device/verbs security domain. For instance
commands that would effect other VFs, or global device resources. The
model is suitable for unprivileged userspace to operate the RDMA
functionality.

The UID has been extended with a "tools resources" permission which allows
additional commands and sub-commands that are intended to match with the
scope limitations set in FWCTL. This is an alternative design to the
"command intent log" where the FW does the enforcement rather than having
the FW report the enforcement the kernel should do.

Consistent with the fwctl definitions the "tools resources" security
context is limited to the FWCTL_RPC_CONFIGURATION,
FWCTL_RPC_DEBUG_READ_ONLY, FWCTL_RPC_DEBUG_WRITE, and
FWCTL_RPC_DEBUG_WRITE_FULL security scopes.

Like RDMA devx, each opened fwctl file descriptor will get a unique UID
associated with each file descriptor.

The fwctl driver is kept simple and we reject commands that can create
objects as the UID mechanism relies on the kernel to track and destroy
objects prior to detroying the UID. Filtering into fwctl sub scopes is
done inside the driver with a switch statement. This substantially limits
what is possible to primarily query functions ad a few limited set
operations.

mlx5 already has a robust infrastructure for delivering RPC messages to
fw. Trivially connect fwctl's RPC mechanism to mlx5_cmd_do(). Enforce the
User Context ID in every RPC header accepted from the FD so the FW knows
the security context of the issuing ID.

Link: https://patch.msgid.link/r/[email protected]
Reviewed-by: Jonathan Cameron <[email protected]>
Signed-off-by: Saeed Mahameed <[email protected]>
Reviewed-by: Leon Romanovsky <[email protected]>
Signed-off-by: Jason Gunthorpe <[email protected]>
2025-03-06 15:13:13 -04:00
Jason Gunthorpe 18285acc2c fwctl: Add documentation
Document the purpose and rules for the fwctl subsystem.

Link in kdocs to the doc tree.

Link: https://patch.msgid.link/r/[email protected]
Nacked-by: Jakub Kicinski <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Acked-by: Daniel Vetter <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Reviewed-by: Jonathan Cameron <[email protected]>
Reviewed-by: Dave Jiang <[email protected]>
Reviewed-by: Shannon Nelson <[email protected]>
Reviewed-by: Bagas Sanjaya <[email protected]>
Signed-off-by: Jason Gunthorpe <[email protected]>
2025-03-06 15:13:13 -04:00