From: sashiko-bot@kernel.org
To: "Amirreza Zarrabi" <amirreza.zarrabi@oss.qualcomm.com>
Cc: conor+dt@kernel.org, devicetree@vger.kernel.org, robh@kernel.org
Subject: Re: [PATCH RFC 03/10] firmware: add RPMI TEE bus support
Date: Tue, 29 Sep 2026 03:29:10 +0000 [thread overview]
Message-ID: <20260929032910.990E51F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260928-riscv-rpmi-tee-abi-v1-3-04908b81d885@oss.qualcomm.com>
Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider:
- [Medium] firmware: rpmi-tee: stub returns NULL instead of ERR_PTR
- [Medium] firmware: rpmi-tee: missing file2alias integration for module auto-loading
- [Low] firmware: rpmi-tee: missing newline in modalias sysfs attribute
--
commit c7783a9ac1224efdc38ee5d5e0d605481f36e278
Author: Amirreza Zarrabi <amirreza.zarrabi@oss.qualcomm.com>
firmware: add RPMI TEE bus support
Add a bus for RISC-V RPMI TEE services. Each service exposed by a
TEE endpoint is registered as its own device on this bus, identified
by a UUID, so that a single physical TEE can host multiple
independently-bindable service drivers.
> diff --git a/drivers/firmware/riscv_rpmi_tee/bus.c b/drivers/firmware/riscv_rpmi_tee/bus.c
> index 0000000000000..32f555c2f1f2a
> --- /dev/null
> +++ b/drivers/firmware/riscv_rpmi_tee/bus.c
> @@ -0,0 +1,202 @@
[ ... ]
> +#define RPMI_TEE_UEVENT_MODALIAS_FMT "rpmi_tee:%pUb"
> +
> +static DEFINE_IDA(rpmi_tee_bus_id);
[Severity: Low]
Does this macro need a trailing newline?
When used by modalias_show() via sysfs_emit(), it will output a string
without a newline, which violates standard sysfs formatting conventions.
[ ... ]
> +static int rpmi_tee_device_uevent(const struct device *dev,
> + struct kobj_uevent_env *env)
> +{
> + const struct rpmi_tee_device *rdev = to_rpmi_tee_dev(dev);
> +
> + return add_uevent_var(env, "MODALIAS=" RPMI_TEE_UEVENT_MODALIAS_FMT,
> + &rdev->uuid);
> +}
[Severity: Medium]
Will this uevent fail to trigger automatic module loading?
If service drivers use MODULE_DEVICE_TABLE(rpmi_tee, ...) to export aliases,
the modpost tool will ignore them because scripts/mod/file2alias.c lacks
support for parsing the rpmi_tee_device_id structure.
[ ... ]
> diff --git a/include/linux/rpmi_tee.h b/include/linux/rpmi_tee.h
> index 0000000000000..c499f0427833e
> --- /dev/null
> +++ b/include/linux/rpmi_tee.h
[ ... ]
> +struct rpmi_tee_device_id {
> + uuid_t uuid;
> +};
Should this structure be defined in include/linux/mod_devicetable.h to
properly integrate with file2alias.c?
[ ... ]
> +#else
> +static inline struct rpmi_tee_device *
> +rpmi_tee_device_register(const uuid_t *uuid, u32 endpoint_id,
> + const struct rpmi_tee_ops *ops, struct device *parent)
> +{
> + return NULL;
> +}
[Severity: Medium]
Should this stub return an error pointer like ERR_PTR(-ENODEV) instead of
NULL?
The active implementation of rpmi_tee_device_register() guarantees an ERR_PTR
on failure. If a caller relies on IS_ERR() to check the return value, this
fallback stub will incorrectly pass the check and lead to a NULL pointer
dereference when the caller attempts to use the returned device pointer.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260928-riscv-rpmi-tee-abi-v1-0-04908b81d885@oss.qualcomm.com?part=3
next prev parent reply other threads:[~2026-09-29 3:29 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-29 3:16 [PATCH RFC 00/10] firmware: riscv: add RPMI TEE service group transport Amirreza Zarrabi
2026-09-29 3:16 ` Amirreza Zarrabi
2026-09-29 3:16 ` Amirreza Zarrabi via OP-TEE
2026-09-29 3:16 ` [PATCH RFC 01/10] mailbox: add direct synchronous send support Amirreza Zarrabi
2026-09-29 3:16 ` Amirreza Zarrabi
2026-09-29 3:16 ` Amirreza Zarrabi via OP-TEE
2026-09-29 3:31 ` sashiko-bot
2026-09-29 3:16 ` [PATCH RFC 02/10] mailbox: mpxy: add direct synchronous send Amirreza Zarrabi
2026-09-29 3:16 ` Amirreza Zarrabi
2026-09-29 3:16 ` Amirreza Zarrabi via OP-TEE
2026-09-29 3:31 ` sashiko-bot
2026-09-29 3:16 ` [PATCH RFC 03/10] firmware: add RPMI TEE bus support Amirreza Zarrabi
2026-09-29 3:16 ` Amirreza Zarrabi
2026-09-29 3:16 ` Amirreza Zarrabi via OP-TEE
2026-09-29 3:29 ` sashiko-bot [this message]
2026-09-29 3:16 ` [PATCH RFC 04/10] dt-bindings: firmware: add RISC-V RPMI TEE transport Amirreza Zarrabi
2026-09-29 3:16 ` Amirreza Zarrabi
2026-09-29 3:16 ` Amirreza Zarrabi via OP-TEE
2026-09-29 3:16 ` [PATCH RFC 05/10] firmware: add RPMI TEE transport core Amirreza Zarrabi
2026-09-29 3:16 ` Amirreza Zarrabi
2026-09-29 3:16 ` Amirreza Zarrabi via OP-TEE
2026-09-29 3:16 ` [PATCH RFC 06/10] firmware: riscv: rpmi-tee: parse system information tables Amirreza Zarrabi
2026-09-29 3:16 ` Amirreza Zarrabi
2026-09-29 3:16 ` Amirreza Zarrabi via OP-TEE
2026-09-29 3:26 ` sashiko-bot
2026-09-29 3:16 ` [PATCH RFC 07/10] firmware: riscv: rpmi-tee: discover TEE services Amirreza Zarrabi
2026-09-29 3:16 ` Amirreza Zarrabi
2026-09-29 3:16 ` Amirreza Zarrabi via OP-TEE
2026-09-29 3:26 ` sashiko-bot
2026-09-29 3:16 ` [PATCH RFC 08/10] firmware: riscv: rpmi-tee: cache TEE capabilities Amirreza Zarrabi
2026-09-29 3:16 ` Amirreza Zarrabi
2026-09-29 3:16 ` Amirreza Zarrabi via OP-TEE
2026-09-29 3:17 ` [PATCH RFC 09/10] firmware: riscv: rpmi-tee: add memory parcel operations Amirreza Zarrabi
2026-09-29 3:17 ` Amirreza Zarrabi
2026-09-29 3:17 ` Amirreza Zarrabi via OP-TEE
2026-09-29 3:29 ` sashiko-bot
2026-09-29 3:17 ` [PATCH RFC 10/10] firmware: riscv: rpmi-tee: add signal bus support Amirreza Zarrabi
2026-09-29 3:17 ` Amirreza Zarrabi
2026-09-29 3:17 ` Amirreza Zarrabi via OP-TEE
2026-09-29 3:29 ` sashiko-bot
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=20260929032910.990E51F000FF@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=amirreza.zarrabi@oss.qualcomm.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--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.