From: sashiko-bot@kernel.org
To: "Abel Vesa" <abel.vesa@oss.qualcomm.com>
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH RFC 1/5] dt-bindings: nvmem: Add UEFI variable NVMEM provider
Date: Wed, 14 Oct 2026 13:11:04 +0000 [thread overview]
Message-ID: <sashiko-outbox-171319@kernel.org> (raw)
In-Reply-To: <20261014-b4-nvmem-efivar-v1-1-187c85f65018@oss.qualcomm.com>
Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider:
- [Medium] dt-bindings: nvmem: use of deprecated direct cell syntax
- [Medium] dt-bindings: nvmem: efivar-guid omission allows variable spoofing
- [Low] dt-bindings: missing pattern constraint for efivar-guid
--
commit 648d72d2afdafd63b69b67763f6747f4034d85b2
Author: Abel Vesa <abel.vesa@oss.qualcomm.com>
dt-bindings: nvmem: Add UEFI variable NVMEM provider
This commit introduces a new device tree binding for an NVMEM provider that
exposes the contents of UEFI variables. It allows provisioned UEFI data to
be consumed via standard nvmem-cells bindings, optionally looking up the
variable by name if the vendor GUID is omitted.
> diff --git a/Documentation/devicetree/bindings/nvmem/nvmem-efivar.yaml b/Documentation/devicetree/bindings/nvmem/nvmem-efivar.yaml
> new file mode 100644
> index 0000000000000..cdc10bee3c6ff
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/nvmem/nvmem-efivar.yaml
[ ... ]
> +allOf:
> + - $ref: nvmem.yaml#
> + - $ref: nvmem-deprecated-cells.yaml#
[Severity: Medium]
Does this binding use the deprecated direct cell syntax?
The NVMEM subsystem guidelines state that defining fixed cells as direct
subnodes is deprecated and that no new bindings should use it. New NVMEM
providers should use the fixed-layout standard with an nvmem-layout child
node containing the cells instead.
[ ... ]
> + efivar-guid:
> + $ref: /schemas/types.yaml#/definitions/string
> + description:
> + Vendor GUID of the UEFI variable, in the canonical
[Severity: Low]
Would it be better to add a pattern constraint to enforce the documented
canonical format?
The schema validation will currently accept arbitrary strings since it
relies on the generic string definition without a regex pattern. Adding a
constraint such as "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
would prevent malformed GUID strings from passing validation.
> + "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" form. Optional; when omitted
> + the variable is looked up by name across the whole variable store.
[Severity: Medium]
Does making the GUID optional introduce a risk of variable spoofing?
The UEFI specification states that variables are uniquely identified only by
the (Name, GUID) tuple. If an attacker with local write access creates a
variable with the same Name but under an unauthenticated GUID, could the
implementation return the spoofed variable depending on firmware enumeration
order?
[ ... ]
> +examples:
> + - |
> + nvmem-efivar {
> + compatible = "nvmem-efivar";
> + efivar-name = "ConfigData";
> + #address-cells = <1>;
> + #size-cells = <1>;
> +
> + cell_a: cell@0 {
> + reg = <0x0 0x6>;
> + };
> +
> + cell_b: cell@6 {
> + reg = <0x6 0x6>;
> + };
[Severity: Medium]
Does this example propagate the deprecated direct subnode anti-pattern?
As noted above regarding nvmem-deprecated-cells.yaml, new NVMEM providers
should demonstrate the use of the fixed-layout standard with an nvmem-layout
child node instead of defining fixed cells as direct subnodes.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261014-b4-nvmem-efivar-v1-0-187c85f65018@oss.qualcomm.com?part=1
next prev parent reply other threads:[~2026-10-14 13:11 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-14 13:02 [PATCH RFC 0/5] nvmem: Add a UEFI variable backed NVMEM provider Abel Vesa
2026-10-14 13:02 ` [PATCH RFC 1/5] dt-bindings: nvmem: Add UEFI variable " Abel Vesa
2026-10-14 13:11 ` sashiko-bot [this message]
2026-10-14 13:02 ` [PATCH RFC 2/5] " Abel Vesa
2026-10-14 13:14 ` sashiko-bot
2026-10-14 13:02 ` [PATCH RFC 3/5] Bluetooth: hci_qca: Support BD address from an nvmem cell Abel Vesa
2026-10-14 13:15 ` sashiko-bot
2026-10-14 13:02 ` [PATCH RFC 4/5] wifi: ath12k: Support MAC address from the firmware node Abel Vesa
2026-10-14 13:16 ` sashiko-bot
2026-10-14 13:02 ` [PATCH RFC 5/5] arm64: dts: qcom: glymur-crd: Source MAC addresses from a UEFI variable Abel Vesa
2026-10-14 14:05 ` Konrad Dybcio
2026-10-14 14:05 ` [PATCH RFC 0/5] nvmem: Add a UEFI variable backed NVMEM provider Konrad Dybcio
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=sashiko-outbox-171319@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=abel.vesa@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox