All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: pankaj.gupta@oss.nxp.com
Cc: conor+dt@kernel.org, robh@kernel.org, devicetree@vger.kernel.org,
	Frank.Li@kernel.org, imx@lists.linux.dev
Subject: Re: [PATCH v50 1/7] Documentation/firmware: add imx/se to other_interfaces
Date: Sat, 12 Sep 2026 11:44:12 +0000	[thread overview]
Message-ID: <20260912114412.D130C1F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260912-imx-se-if-v50-1-80834ef510d3@nxp.com>

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [High] The documented signal handling design drops successful responses for completed hardware commands, breaking non-idempotent operations.
- [Low] The ASCII sequence diagram for concurrent ELE_STORAGE_OPEN_REQ ioctls uses confusing and incorrectly directed arrows, misrepresenting the flow of operations.
--

commit c9bb0d9967cd15b4acd5ef648fe93b131b0a638a
Author: Pankaj Gupta <pankaj.gupta@nxp.com>

Documentation/firmware: add imx/se to other_interfaces

This commit documents the i.MX SoC Service layer and C_DEV driver for 
secure enclaves like the NXP EdgeLock Enclave. It details MU 
communication, character device usage, and synchronization protocols.

> diff --git a/Documentation/driver-api/firmware/other_interfaces.rst b/Documentation/driver-api/firmware/other_interfaces.rst
> index 06ac89adaafba..984ee3ecc8dc2 100644
> --- a/Documentation/driver-api/firmware/other_interfaces.rst
> +++ b/Documentation/driver-api/firmware/other_interfaces.rst

[ ... ]

> +      |                    |                      |  [B gets lock]   |
> +      |                    |                      |--STORAGE_OPEN_REQ->
> +      |                    |                      |  [FW rejects:    |
> +      |                    |                      |   one storage    |
> +      |                    |                      |   at a time]     |
> +      |                    |                      |<--ERROR_RSP------|

[Severity: Low]
Is this diagram accurate? The arrows seem to originate from FW and point
directly to Userspace B, bypassing the Kernel column. Does this misrepresent
the flow of operations by implying firmware directly interacts with userspace?

> +      |                    |  se_val_rsp_hdr_n_status: -EPERM        |
> +      |                    |  fw_api_specific_ops not called         |
> +      |                    |<--ioctl -EPERM-to B------------------->|

[ ... ]

> +      |                    |<--CMD_RSP------------|
> +      |  wait_for_completion_interruptible()      |
> +      |  wakes: signal seen -> -ERESTARTSYS       |
> +      |                    |                      |
> +      |            [response is in rx_msg:        |
> +      |             validate with                 |
> +      |             se_val_rsp_hdr_n_status()]    |
> +      |            [fw_api_specific_ops()         |
> +      |             (is_cmd_interrupted=true):    |
> +      |             for SESSION_OPEN: record      |
> +      |             handle, close session via     |
> +      |             se_close_session(), clear;    |
> +      |             for STORAGE_OPEN: record      |
> +      |             handle, close storage via     |
> +      |             se_close_storage(), return 0] |
> +      |            err = -EINTR                   |
> +      |            (not -ERESTARTSYS:             |
> +      |             prevents VFS auto-restart)    |
> +      |<--ioctl -EINTR-----|                      |

[Severity: High]
Could returning an error (-EINTR) to userspace for a hardware command that
successfully completed cause userspace to incorrectly assume the operation
was aborted?

For non-idempotent operations (like incrementing a monotonic counter or
generating a key), could this lead to userspace erroneously retrying and
double-executing the operation in hardware?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260912-imx-se-if-v50-0-80834ef510d3@nxp.com?part=1

  reply	other threads:[~2026-09-12 11:44 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-12 17:03 [PATCH v50 0/7] firmware: imx: driver for NXP secure-enclave pankaj.gupta
2026-09-12 17:03 ` [PATCH v50 1/7] Documentation/firmware: add imx/se to other_interfaces pankaj.gupta
2026-09-12 11:44   ` sashiko-bot [this message]
2026-09-12 17:03 ` [PATCH v50 2/7] dt-bindings: arm: fsl: add imx-se-fw binding doc pankaj.gupta
2026-09-12 11:45   ` sashiko-bot
2026-09-12 17:03 ` [PATCH v50 3/7] firmware: imx: add driver for NXP EdgeLock Enclave pankaj.gupta
2026-09-12 11:46   ` sashiko-bot
2026-09-14 10:45   ` Frieder Schrempf
2026-09-14 10:47     ` [EXT] " Pankaj Gupta
2026-09-14 10:47     ` Frieder Schrempf
2026-09-17 10:22       ` [EXT] " Pankaj Gupta
2026-09-12 17:03 ` [PATCH v50 4/7] firmware: imx: device context dedicated to priv pankaj.gupta
2026-09-12 17:03 ` [PATCH v50 5/7] firmware: imx: adds miscdev pankaj.gupta
2026-09-12 11:48   ` sashiko-bot
2026-09-12 12:04     ` Pankaj Gupta (OSS)
2026-09-12 17:03 ` [PATCH v50 6/7] arm64: dts: imx8ulp: add secure enclave node pankaj.gupta
2026-09-12 11:45   ` sashiko-bot
2026-09-12 17:03 ` [PATCH v50 7/7] arm64: dts: imx8ulp: add reserved memory for EdgeLock Enclave pankaj.gupta

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=20260912114412.D130C1F000FF@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=Frank.Li@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=imx@lists.linux.dev \
    --cc=pankaj.gupta@oss.nxp.com \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.