All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Bard Liao <yung-chuan.liao@linux.intel.com>
Cc: Tavian Barnes <tavianator@tavianator.com>,
	Brent Lu <brent.lu@intel.com>,
	linux-sound@vger.kernel.org
Subject: Re: Bad topology file paths when re-inserting snd_sof_pci_intel_tgl
Date: Wed, 23 Apr 2025 09:27:30 +0200	[thread overview]
Message-ID: <87wmbbjq1p.wl-tiwai@suse.de> (raw)
In-Reply-To: <CABg4E-nVdZa9oOi3a6FYQ60Wc93aq_8CpO2J4nZxVv94o98quw@mail.gmail.com>

On Tue, 22 Apr 2025 20:48:40 +0200,
Tavian Barnes wrote:
> 
> I'm trying to debug some audio issues on my ThinkPad X1 Carbon (Gen
> 10), and I noticed something that's probably a bug: when I remove and
> re-insert the snd_sof_pci_intel_tgl module, it tries to load a
> different tplg file every time.  Example:
> 
> # dmesg -t | grep tplg
> sof-audio-pci-intel-tgl 0000:00:1f.3:  Topology file:
> intel/sof-tplg/sof-hda-generic-idisp-4ch.tplg
> # modprobe -r snd_sof_pci_intel_tgl
> # modprobe snd_sof_pci_intel_tgl
> # dmesg | grep tplg
> sof-audio-pci-intel-tgl 0000:00:1f.3:  Topology file:
> intel/sof-tplg/sof-hda-generic-idisp-4ch.tplg
> sof-audio-pci-intel-tgl 0000:00:1f.3:  Topology file:
> intel/sof-tplg/sof-hda-generic-idisp-idisp-4ch.tplg
> # modprobe -r snd_sof_pci_intel_tgl
> # modprobe snd_sof_pci_intel_tgl
> # dmesg | grep tplg
> sof-audio-pci-intel-tgl 0000:00:1f.3:  Topology file:
> intel/sof-tplg/sof-hda-generic-idisp-4ch.tplg
> sof-audio-pci-intel-tgl 0000:00:1f.3:  Topology file:
> intel/sof-tplg/sof-hda-generic-idisp-idisp-4ch.tplg
> sof-audio-pci-intel-tgl 0000:00:1f.3:  Topology file:
> intel/sof-tplg/\xa0\x11\xaf\x0e\x8d\x8e\xff\xff\xb0\x11\xaf\x0e\x8d\x8e\xff\xff\xb0\x11\xaf\x0e\x8d\x8e\xff\xff-idisp-4ch.tplg
> 
> The second time, it added an extra -idisp to the path
> (intel/sof-tplg/sof-hda-generic-idisp-idisp-4ch.tplg).  The third
> time, the path seems to have become totally corrupted.
> 
> I'm seeing this on kernel version 6.14.3-arch1, which has no
> sound-related changes from the regular stable 6.14.3 kernel.  I can
> try current master but I don't see any relevant changes to the code
> that adds -idisp in sound/soc/sof/intel/hda.c.

Looks like a bug introduced by the commit
5458411d75947a4212e50a401ec0a98d4c6c931b
    ASoC: SOF: Intel: hda: refactoring topology name fixup for HDA mach
It overwrites hda_mach->sof_tplg_filename with a string of
devm_kasprintf().


thanks,

Takashi

  reply	other threads:[~2025-04-23  7:27 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-22 18:48 Bad topology file paths when re-inserting snd_sof_pci_intel_tgl Tavian Barnes
2025-04-23  7:27 ` Takashi Iwai [this message]
2025-04-23 15:07   ` [PATCH] ASoC: SOF: Intel: hda: Fix UAF when reloading module Tavian Barnes
2025-04-23 16:50     ` [PATCH v2] " Tavian Barnes
2025-05-06 15:12       ` [PATCH RESEND " Tavian Barnes
2025-05-07  5:09       ` Liao, Bard
2025-05-07  7:33       ` Péter Ujfalusi
2025-05-07 14:04         ` Tavian Barnes
2025-05-15  8:05       ` Péter Ujfalusi
2025-05-15 12:19         ` Tavian Barnes

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=87wmbbjq1p.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=brent.lu@intel.com \
    --cc=linux-sound@vger.kernel.org \
    --cc=tavianator@tavianator.com \
    --cc=yung-chuan.liao@linux.intel.com \
    /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.