All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Mohammad Rafi Shaik" <mohammad.rafi.shaik@oss.qualcomm.com>
Cc: robh@kernel.org, conor+dt@kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v1 4/5] ASoC: dt-bindings: qcom,sm8250: Add Nord Ride sound card
Date: Mon, 07 Sep 2026 18:20:48 +0000	[thread overview]
Message-ID: <20260907182049.6DA1F1F00A3A@smtp.kernel.org> (raw)
In-Reply-To: <20260907-nord-asoc-driver-support-v1-4-997d3b20cf43@oss.qualcomm.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] Casting `clk_disable_unprepare` to `(void (*)(void *))` causes a Control Flow Integrity (CFI) violation when the cleanup action is executed.
--

commit a3caa5181a58d82be436be2044f000032a4ea1ab
Author: Mohammad Rafi Shaik <mohammad.rafi.shaik@oss.qualcomm.com>

ASoC: dt-bindings: qcom,sm8250: Add Nord Ride sound card
    
Document the bindings for the Qualcomm Nord Ride board specific sound card.
The bindings are the same as for other newer Qualcomm ADSP sound cards, thus
keep them in existing qcom,sm8250.yaml file.

> diff --git a/Documentation/devicetree/bindings/sound/qcom,sm8250.yaml b/Documentation/devicetree/bindings/sound/qcom,sm8250.yaml
> index 1536fcd96d687..bdbaa8c822fcd 100644
> --- a/Documentation/devicetree/bindings/sound/qcom,sm8250.yaml
> +++ b/Documentation/devicetree/bindings/sound/qcom,sm8250.yaml
> @@ -38,6 +38,7 @@ properties:
>            - fairphone,fp5-sndcard
>            - qcom,apq8096-sndcard
>            - qcom,glymur-sndcard
> +          - qcom,nord-ride-sndcard
>            - qcom,qcm6490-idp-sndcard
>            - qcom,qcs615-sndcard
>            - qcom,qcs6490-rb3gen2-sndcard

[Severity: High]
Does casting clk_disable_unprepare to (void (*)(void *)) cause a Control Flow
Integrity (CFI) violation when the cleanup action is executed?

Looking at pcm1681_i2c_probe() in sound/soc/codecs/pcm1681.c:

sound/soc/codecs/pcm1681.c:pcm1681_i2c_probe() {
    ...
	ret = devm_add_action_or_reset(&client->dev,
				       (void (*)(void *))clk_disable_unprepare,
				       priv->sclk);
    ...
}

Because clk_disable_unprepare() takes a struct clk *, casting it to
void (*)(void *) and registering it as a devm action means the type hashes
will not match on kernels built with CONFIG_CFI_CLANG.

When the device is unbound (which can happen naturally if a subsequent step
in the probe path fails, or by an administrator via sysfs), the devres
cleanup indirectly calls this action. Can this trigger a CFI panic during
cleanup?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260907-nord-asoc-driver-support-v1-0-997d3b20cf43@oss.qualcomm.com?part=4

  reply	other threads:[~2026-09-07 18:20 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-07 18:09 [PATCH 0/5] ASoC: qcom: Add Nord Ride audio support Mohammad Rafi Shaik
2026-09-07 18:09 ` [PATCH v1 1/5] ASoC: codec: adau1977-i2c: Add OF device match table Mohammad Rafi Shaik
2026-09-07 18:20   ` sashiko-bot
2026-09-09 14:44   ` Shawn Guo
2026-09-07 18:09 ` [PATCH v1 2/5] ASoC: dt-bindings: ti,pcm1681: Document the optional SCK clock Mohammad Rafi Shaik
2026-09-09 14:50   ` Shawn Guo
2026-09-07 18:09 ` [PATCH v1 3/5] ASoC: codec: pcm1681: Enable system clock before regmap access Mohammad Rafi Shaik
2026-09-07 18:17   ` sashiko-bot
2026-09-08 17:26   ` Mark Brown
2026-09-09 12:36     ` Mohammad Rafi Shaik
2026-09-09 12:39       ` Mark Brown
2026-09-09 12:45         ` Mohammad Rafi Shaik
2026-09-09 14:59   ` Shawn Guo
2026-09-07 18:09 ` [PATCH v1 4/5] ASoC: dt-bindings: qcom,sm8250: Add Nord Ride sound card Mohammad Rafi Shaik
2026-09-07 18:20   ` sashiko-bot [this message]
2026-09-09 14:54   ` Shawn Guo
2026-09-07 18:09 ` [PATCH v1 5/5] ASoC: qcom: sc8280xp: Add Nord Ride sound card support Mohammad Rafi Shaik
2026-09-09 15:37   ` Shawn Guo
2026-09-09 14:46 ` [PATCH 0/5] ASoC: qcom: Add Nord Ride audio support Shawn Guo

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=20260907182049.6DA1F1F00A3A@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=mohammad.rafi.shaik@oss.qualcomm.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.