Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

request for rt5514 topology #22

Closed
jmontleon opened this issue Nov 5, 2023 · 16 comments
Closed

request for rt5514 topology #22

jmontleon opened this issue Nov 5, 2023 · 16 comments

Comments

@jmontleon
Copy link

I was looking to test / use the patch set at:
https://patchwork.kernel.org/project/alsa-devel/list/?series=797110&state=%2A&archive=both

From conversation at jmontleon/pixelbook-fedora#67 (comment) it sounds like I'll probably need a topology file to proceed.

@amadeuszslawinski-intel
Copy link
Collaborator

amadeuszslawinski-intel commented May 21, 2024

Hi, topology for rt5514 was added in d4d8936

I can also help with UCMs, but would need to see what pulseaudio thinks that name of machine should be.
I usually do something like:
$ pulseaudio -k; strace -o /tmp/pulse.txt -f pulseaudio
and then check:
$ grep -RI "\/usr\/share\/alsa\/ucm2\/conf.d\/" /tmp/pulse.txt
not sure if there is better way, but that should give me what I want.

@jmontleon
Copy link
Author

Sorry for the delayed response. This is what it comes back with. Please let me know if I can provide anything else!

2778  access("/usr/share/alsa/ucm2/conf.d/kbl-r5514-5663-/Google-Eve-1.0.conf", R_OK) = -1 ENOENT (No such file or directory)
2778  access("/usr/share/alsa/ucm2/conf.d/kbl-r5514-5663-/kbl-r5514-5663-.conf", R_OK) = 0
2778  newfstatat(AT_FDCWD, "/usr/share/alsa/ucm2/conf.d/kbl-r5514-5663-/kbl-r5514-5663-.conf", {st_mode=S_IFLNK|0777, st_size=48, ...}, AT_SYMLINK_NOFOLLOW) = 0
2778  readlink("/usr/share/alsa/ucm2/conf.d/kbl-r5514-5663-/kbl-r5514-5663-.conf", "../../Intel/kbl-r5514-5663-/kbl-"..., 4095) = 48
2778  openat(AT_FDCWD, "/usr/share/alsa/ucm2/conf.d/kbl-r5514-5663-/kbl-r5514-5663-.conf", O_RDONLY) = 16
2778  openat(AT_FDCWD, "/usr/share/alsa/ucm2/conf.d/kbl-r5514-5663-/../../Intel/kbl-r5514-5663-/HiFi.conf", O_RDONLY) = 16

@jmontleon
Copy link
Author

It just occurred to me that I did not do this with avs enabled. I will rerun it shortly with avs enabled.

@jmontleon
Copy link
Author

Unfortunately it looks like with AVS enabled I'm hitting a new issue:

    8.811450] BUG: unable to handle page fault for address: ffffb07d40b65b14
[    8.811464] #PF: supervisor write access in kernel mode
[    8.811468] #PF: error_code(0x0003) - permissions violation
[    8.811472] PGD 100000067 P4D 100000067 PUD 100274067 PMD 107a55067 PTE 800000011e8d3021
[    8.811481] Oops: 0003 [#1] PREEMPT SMP PTI
[    8.811486] CPU: 3 PID: 724 Comm: (udev-worker) Not tainted 6.8.10-300.fc40.x86_64 #1
[    8.811492] Hardware name: Google Eve/Eve, BIOS MrChromebox-4.22.4 04/16/2024
[    8.811495] RIP: 0010:strscpy+0x53/0x150
[    8.811505] Code: 87 00 00 00 49 89 d3 48 83 fa 07 0f 86 9c 00 00 00 48 be 80 80 80 80 80 80 80 80 53 31 c0 48 bb ff fe fe fe fe fe fe fe eb 1b <49> 89 0c 01 48 8d 50 08 4c 89 d9 48 29 d1 48 89 d0 48 83 f9 07 0f
[    8.811509] RSP: 0018:ffffb07d40aa37c8 EFLAGS: 00010246
[    8.811514] RAX: 0000000000000000 RBX: fefefefefefefeff RCX: 5f63313a30707373
[    8.811517] RDX: 0000000000000000 RSI: 8080808080808080 RDI: ffffb07d40aa37dc
[    8.811520] RBP: ffffb07d40aa37dc R08: 5e6230392f6f7272 R09: ffffb07d40b65b14
[    8.811523] R10: 000000000000000b R11: 000000000000000b R12: 0000000000000000
[    8.811526] R13: 0000000000000001 R14: ffffb07d40b65b14 R15: ffffa031824c3c28
[    8.811529] FS:  00007fb0ca51e980(0000) GS:ffffa034eed80000(0000) knlGS:0000000000000000
[    8.811533] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[    8.811536] CR2: ffffb07d40b65b14 CR3: 0000000101706005 CR4: 00000000003706f0
[    8.811540] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[    8.811542] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[    8.811545] Call Trace:
[    8.811549]  <TASK>
[    8.811554]  ? __die+0x23/0x70
[    8.811560]  ? page_fault_oops+0x174/0x540
[    8.811567]  ? search_bpf_extables+0x5f/0x80
[    8.811575]  ? exc_page_fault+0x175/0x180
[    8.811582]  ? asm_exc_page_fault+0x26/0x30
[    8.811591]  ? strscpy+0x53/0x150
[    8.811599]  avs_route_load+0xef/0x1c0 [snd_soc_avs]
[    8.811625]  soc_tplg_dapm_graph_elems_load+0x73/0x250 [snd_soc_core]
[    8.811673]  ? __pfx_soc_tplg_dapm_graph_elems_load+0x10/0x10 [snd_soc_core]
[    8.811707]  snd_soc_tplg_component_load+0x1c3/0x3a0 [snd_soc_core]
[    8.811748]  avs_load_topology+0x50/0xc0 [snd_soc_avs]
[    8.811768]  avs_component_probe+0x98/0x390 [snd_soc_avs]
[    8.811789]  snd_soc_component_probe+0x1f/0x60 [snd_soc_core]
[    8.811836]  soc_probe_component+0x1ad/0x380 [snd_soc_core]
[    8.811886]  snd_soc_bind_card+0x5e6/0xda0 [snd_soc_core]
[    8.811932]  ? __devres_alloc_node+0x44/0x80
[    8.811940]  devm_snd_soc_register_card+0x47/0x90 [snd_soc_core]
[    8.811994]  platform_probe+0x41/0xa0
[    8.812002]  really_probe+0x19b/0x3e0
[    8.812008]  ? __pfx___driver_attach+0x10/0x10
[    8.812013]  __driver_probe_device+0x78/0x160
[    8.812019]  driver_probe_device+0x1f/0xa0
[    8.812024]  __driver_attach+0xba/0x1c0
[    8.812030]  bus_for_each_dev+0x8c/0xe0
[    8.812039]  bus_add_driver+0x146/0x250
[    8.812048]  driver_register+0x5c/0x100
[    8.812054]  ? __pfx_avs_rt5514_driver_init+0x10/0x10 [snd_soc_avs_rt5514]
[    8.812065]  do_one_initcall+0x58/0x320
[    8.812075]  do_init_module+0x90/0x270
[    8.812083]  __do_sys_init_module+0x17a/0x1b0
[    8.812093]  do_syscall_64+0x83/0x170
[    8.812101]  ? xfs_file_read_iter+0xb5/0x1a0 [xfs]
[    8.812432]  ? vfs_read+0x24c/0x380
[    8.812440]  ? audit_reset_context+0x232/0x300
[    8.812449]  ? syscall_exit_to_user_mode_prepare+0x178/0x1a0
[    8.812456]  ? syscall_exit_to_user_mode+0x83/0x230
[    8.812461]  ? do_syscall_64+0x8f/0x170
[    8.812469]  ? __count_memcg_events+0x69/0x100
[    8.812476]  ? count_memcg_events.constprop.0+0x1a/0x30
[    8.812482]  ? handle_mm_fault+0x1f2/0x350
[    8.812490]  ? do_user_addr_fault+0x304/0x690
[    8.812499]  ? exc_page_fault+0x7f/0x180
[    8.812507]  entry_SYSCALL_64_after_hwframe+0x78/0x80
[    8.812515] RIP: 0033:0x7fb0caee257e
[    8.812537] Code: 48 8b 0d 9d 98 0c 00 f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa 49 89 ca b8 af 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 6a 98 0c 00 f7 d8 64 89 01 48
[    8.812542] RSP: 002b:00007ffe69013ba8 EFLAGS: 00000246 ORIG_RAX: 00000000000000af
[    8.812550] RAX: ffffffffffffffda RBX: 000055e6f6eec070 RCX: 00007fb0caee257e
[    8.812554] RDX: 00007fb0caffa07d RSI: 000000000000c55e RDI: 000055e6f77eff00
[    8.812559] RBP: 00007ffe69013c60 R08: 000055e6f67c9010 R09: 0000000000000007
[    8.812563] R10: 0000000000000006 R11: 0000000000000246 R12: 00007fb0caffa07d
[    8.812567] R13: 0000000000020000 R14: 000055e6f6eed150 R15: 000055e6f6fe6840
[    8.812575]  </TASK>
[    8.812578] Modules linked in: snd_sof(+) intel_uncore_frequency snd_soc_avs_probe(+) intel_uncore_frequency_common snd_soc_avs_rt5514(+) snd_soc_avs_max98927(+) snd_sof_utils bnep soundwire_generic_allocation soundwire_bus spi_nor cros_ec_sensorhub intel_tcc_cooling cros_usbpd_logger cros_ec_sysfs cros_usbpd_charger x86_pkg_temp_thermal intel_powerclamp iTCO_wdt qrtr cros_ec_chardev coretemp intel_pmc_bxt snd_hda_codec_hdmi iwlmvm mtd iTCO_vendor_support snd_soc_avs intel_rapl_msr snd_soc_hda_codec mac80211 kvm_intel i2c_hid_acpi i2c_hid snd_soc_skl libarc4 snd_soc_hdac_hda cros_ec_dev uvcvideo kvm snd_hda_ext_core uvc iwlwifi videobuf2_vmalloc videobuf2_memops btusb snd_soc_sst_ipc irqbypass videobuf2_v4l2 btrtl rapl snd_soc_sst_dsp snd_soc_acpi_intel_match videobuf2_common btintel intel_cstate snd_soc_acpi btbcm btmtk cfg80211 snd_hda_intel bluetooth snd_intel_dspcfg snd_intel_sdw_acpi intel_uncore snd_hda_codec snd_soc_rt5663 videodev snd_soc_rt5514 sunrpc snd_soc_rt5514_spi snd_soc_rl6231 snd_soc_max98927
[    8.812669]  snd_hda_core snd_soc_core spi_intel_pci spi_intel snd_hwdep i2c_i801 mc i2c_smbus snd_seq snd_compress rfkill ac97_bus snd_pcm_dmaengine snd_seq_device processor_thermal_device_pci_legacy processor_thermal_device idma64 processor_thermal_wt_hint snd_pcm processor_thermal_rfim processor_thermal_rapl intel_rapl_common processor_thermal_wt_req processor_thermal_power_floor snd_timer processor_thermal_mbox intel_xhci_usb_role_switch intel_soc_dts_iosf snd intel_pch_thermal binfmt_misc soundcore tpm_tis_i2c_cr50 cros_ec_i2c intel_vbtn sparse_keymap soc_button_array int3403_thermal intel_pmc_core int340x_thermal_zone cros_usbpd_notify intel_vsec cros_kbd_led_backlight vfat fat pmt_telemetry pmt_class int3400_thermal acpi_thermal_rel joydev cros_ec_lpcs cros_ec loop nfnetlink zram xfs i915 i2c_algo_bit drm_buddy ttm crct10dif_pclmul nvme crc32_pclmul crc32c_intel polyval_clmulni polyval_generic nvme_core drm_display_helper sdhci_pci cqhci ghash_clmulni_intel spi_pxa2xx_platform sha512_ssse3 sdhci sha256_ssse3
[    8.812756]  hid_multitouch sha1_ssse3 mmc_core dw_dmac nvme_auth cec video wmi pinctrl_sunrisepoint serio_raw ip6_tables ip_tables fuse [last unloaded: i2c_hid]
[    8.812779] CR2: ffffb07d40b65b14
[    8.812785] ---[ end trace 0000000000000000 ]---
[    8.812788] RIP: 0010:strscpy+0x53/0x150
[    8.812798] Code: 87 00 00 00 49 89 d3 48 83 fa 07 0f 86 9c 00 00 00 48 be 80 80 80 80 80 80 80 80 53 31 c0 48 bb ff fe fe fe fe fe fe fe eb 1b <49> 89 0c 01 48 8d 50 08 4c 89 d9 48 29 d1 48 89 d0 48 83 f9 07 0f
[    8.812802] RSP: 0018:ffffb07d40aa37c8 EFLAGS: 00010246
[    8.812806] RAX: 0000000000000000 RBX: fefefefefefefeff RCX: 5f63313a30707373
[    8.812809] RDX: 0000000000000000 RSI: 8080808080808080 RDI: ffffb07d40aa37dc
[    8.812812] RBP: ffffb07d40aa37dc R08: 5e6230392f6f7272 R09: ffffb07d40b65b14
[    8.812815] R10: 000000000000000b R11: 000000000000000b R12: 0000000000000000
[    8.812818] R13: 0000000000000001 R14: ffffb07d40b65b14 R15: ffffa031824c3c28
[    8.812821] FS:  00007fb0ca51e980(0000) GS:ffffa034eed80000(0000) knlGS:0000000000000000
[    8.812824] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[    8.812828] CR2: ffffb07d40b65b14 CR3: 0000000101706005 CR4: 00000000003706f0
[    8.812831] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[    8.812834] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

@jmontleon
Copy link
Author

After trying a bunch of different kernels, etc. I discovered downgrading alsa-sof-firmware to alsa-sof-firmware-2023.09.2-1.fc39.noarch stops the above trace from happening. Moving up available packages 2023.12.1 or newer causes the errors above to reappear in dmesg. I don't know if anyone on this issue or @WeirdTreeThing might have an idea what might be the cause of that.

With the old firmware the old 6.7.rc0 kernel I had built I have audio. With 6.8.10 something has changed and though aplay -l shows the builtin speakers they are not available for use in pulseaudio or pipewire.

$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 1: avsmax98927 [avs_max98927], device 1: Built-in Speakers (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: hdaudioB0D2 [hdaudioB0D2], device 1: HDMI1 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: hdaudioB0D2 [hdaudioB0D2], device 2: HDMI2 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: hdaudioB0D2 [hdaudioB0D2], device 3: HDMI3 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 3: avsrt5663 [avs_rt5663], device 1: Headset (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0

Anyway, the output you requested:

2187  access("/usr/share/alsa/ucm2/conf.d/hdaudioB0D2/Google-Eve-1.0.conf", R_OK) = -1 ENOENT (No such file or directory)
2187  access("/usr/share/alsa/ucm2/conf.d/hdaudioB0D2/hdaudioB0D2.conf", R_OK) = 0
2187  newfstatat(AT_FDCWD, "/usr/share/alsa/ucm2/conf.d/hdaudioB0D2/hdaudioB0D2.conf", {st_mode=S_IFREG|0644, st_size=94, ...}, AT_SYMLINK_NOFOLLOW) = 0
2187  openat(AT_FDCWD, "/usr/share/alsa/ucm2/conf.d/hdaudioB0D2/hdaudioB0D2.conf", O_RDONLY) = 16
2187  openat(AT_FDCWD, "/usr/share/alsa/ucm2/conf.d/hdaudioB0D2/HiFi.conf", O_RDONLY) = 16
2187  access("/usr/share/alsa/ucm2/conf.d/avs_max98927/Google-Eve-1.0.conf", R_OK) = -1 ENOENT (No such file or directory)
2187  access("/usr/share/alsa/ucm2/conf.d/avs_max98927/avs_max98927.conf", R_OK) = 0
2187  newfstatat(AT_FDCWD, "/usr/share/alsa/ucm2/conf.d/avs_max98927/avs_max98927.conf", {st_mode=S_IFREG|0644, st_size=103, ...}, AT_SYMLINK_NOFOLLOW) = 0
2187  openat(AT_FDCWD, "/usr/share/alsa/ucm2/conf.d/avs_max98927/avs_max98927.conf", O_RDONLY) = 33
2187  openat(AT_FDCWD, "/usr/share/alsa/ucm2/conf.d/avs_max98927/HiFi.conf", O_RDONLY) = 33
2187  access("/usr/share/alsa/ucm2/conf.d/avs_probe_mb/Google-Eve-1.0.conf", R_OK) = -1 ENOENT (No such file or directory)
2187  access("/usr/share/alsa/ucm2/conf.d/avs_probe_mb/avs_probe_mb.conf", R_OK) = -1 ENOENT (No such file or directory)
2187  access("/usr/share/alsa/ucm2/conf.d/avs_probe_mb/Google-Eve-1.0.conf", R_OK) = -1 ENOENT (No such file or directory)
2187  access("/usr/share/alsa/ucm2/conf.d/avs_probe_mb/avs_probe_mb.conf", R_OK) = -1 ENOENT (No such file or directory)
2187  access("/usr/share/alsa/ucm2/conf.d/avs_rt5663/Google-Eve-1.0.conf", R_OK) = -1 ENOENT (No such file or directory)
2187  access("/usr/share/alsa/ucm2/conf.d/avs_rt5663/avs_rt5663.conf", R_OK) = 0
2187  newfstatat(AT_FDCWD, "/usr/share/alsa/ucm2/conf.d/avs_rt5663/avs_rt5663.conf", {st_mode=S_IFREG|0644, st_size=106, ...}, AT_SYMLINK_NOFOLLOW) = 0
2187  openat(AT_FDCWD, "/usr/share/alsa/ucm2/conf.d/avs_rt5663/avs_rt5663.conf", O_RDONLY) = 33
2187  openat(AT_FDCWD, "/usr/share/alsa/ucm2/conf.d/avs_rt5663/HiFi.conf", O_RDONLY) = 33

@amadeuszslawinski-intel
Copy link
Collaborator

I've already made UCMs for Google Eve, you can check them here and let me know how it goes: alsa-project/alsa-ucm-conf#418

When it comes to the kernel splat, it seems like it fails while loading topology - are those alsa-sof-firmware packages you mentioned available somewhere online, so I can see what files are packaged and what may have gone wrong? (I tried quick search, but haven't found anything sensible.)

We also did a release with built topology files: https://github.com/thesofproject/avs-topology-xml/releases/tag/v2024.02 so you can try with that instead of your distribution ones?

@jmontleon
Copy link
Author

jmontleon commented May 24, 2024

I'll work on giving the UCMs for Eve and topoloxy you linked a try. It's late (early now) here so it'll probably be a few hours sleep in between now and then.

The alsa-sof-firmware packages I am using are available in koji:
https://koji.fedoraproject.org/koji/packageinfo?packageID=30869

Judging by the rpm spec it looks like the source for these are https://github.com/thesofproject/sof-bin and a few others repos
https://src.fedoraproject.org/rpms/alsa-sof-firmware/blob/rawhide/f/alsa-sof-firmware.spec#_26

I landed on 2023.09.2 because when we last tested this and got it mostly working it was in November and it seemed likely the version I'd have installed then. I started looking at firmware because the kernel I built back then wasn't working now either.

Apologies if I am explaining stuff you already know: if you download and want to extract any of the rpms from koji you can rpm2cpio whatever.rpm | cpio -ivd to extract it to the local directory if you want to inspect the contents; I guess rpm2cpio might be the mildly tricky part depending on distro, so maybe in a container or whatever.

@amadeuszslawinski-intel
Copy link
Collaborator

Yes, for the newer ones alsa-sof-firmware also includes the package I mentioned.

So I've built v6.8.10 kernel, as that's the version you seem to use and put topologies from our package along with proper FW file and it seems to have loaded properly. So I suspect some kind of integration issue on distribution side.

However I've compared md5sum of few files from Fedora package and the ones in avs-topology-xml release and they seem fine.

Can you share a bit more of dmesg log? It should be logging which topology it tries to load (and if not additional debug level can be enabled to see it).

@jmontleon
Copy link
Author

jmontleon commented May 24, 2024

Good news, it seems it's just outdated topology files in the alsa-sof-firmware package in Fedora.

The easiest way I could see what was trying to be loaded was to just uninstall the package:

[    9.455992] snd_soc_avs 0000:00:1f.3: request topology "intel/avs/rt5663-tplg.bin" failed: -2
[    9.486031] snd_soc_avs 0000:00:1f.3: request topology "intel/avs/max98927-tplg.bin" failed: -2
[    9.507830] snd_soc_avs 0000:00:1f.3: request topology "intel/avs/hda-8086280b-tplg.bin" failed: -2
[    9.513492] snd_soc_avs 0000:00:1f.3: request topology "intel/avs/rt5514-tplg.bin" failed: -2
[    9.507934] snd_soc_avs 0000:00:1f.3: request topology "intel/avs/hda-8086-generic-tplg.bin" failed: -2

From there I just copied those in from https://github.com/thesofproject/avs-topology-xml/releases/tag/v2024.02

No more splat at that point.

Then I copied in your UCMs and have working audio.

And in case it looks any different the answer to your original question:

3518  access("/usr/share/alsa/ucm2/conf.d/hdaudioB0D2/Google-Eve-1.0.conf", R_OK) = 0
3518  newfstatat(AT_FDCWD, "/usr/share/alsa/ucm2/conf.d/hdaudioB0D2/Google-Eve-1.0.conf", {st_mode=S_IFREG|0644, st_size=104, ...}, AT_SYMLINK_NOFOLLOW) = 0
3518  openat(AT_FDCWD, "/usr/share/alsa/ucm2/conf.d/hdaudioB0D2/Google-Eve-1.0.conf", O_RDONLY) = 16
3518  openat(AT_FDCWD, "/usr/share/alsa/ucm2/conf.d/hdaudioB0D2/Google-Eve-1.0-HiFi.conf", O_RDONLY) = 16
3518  access("/usr/share/alsa/ucm2/conf.d/avs_max98927/Google-Eve-1.0.conf", R_OK) = 0
3518  newfstatat(AT_FDCWD, "/usr/share/alsa/ucm2/conf.d/avs_max98927/Google-Eve-1.0.conf", {st_mode=S_IFREG|0644, st_size=104, ...}, AT_SYMLINK_NOFOLLOW) = 0
3518  openat(AT_FDCWD, "/usr/share/alsa/ucm2/conf.d/avs_max98927/Google-Eve-1.0.conf", O_RDONLY) = 33
3518  openat(AT_FDCWD, "/usr/share/alsa/ucm2/conf.d/avs_max98927/Google-Eve-1.0-HiFi.conf", O_RDONLY) = 33
3518  access("/usr/share/alsa/ucm2/conf.d/avs_probe_mb/Google-Eve-1.0.conf", R_OK) = -1 ENOENT (No such file or directory)
3518  access("/usr/share/alsa/ucm2/conf.d/avs_probe_mb/avs_probe_mb.conf", R_OK) = -1 ENOENT (No such file or directory)
3518  access("/usr/share/alsa/ucm2/conf.d/avs_probe_mb/Google-Eve-1.0.conf", R_OK) = -1 ENOENT (No such file or directory)
3518  access("/usr/share/alsa/ucm2/conf.d/avs_probe_mb/avs_probe_mb.conf", R_OK) = -1 ENOENT (No such file or directory)
3518  access("/usr/share/alsa/ucm2/conf.d/avs_rt5514/Google-Eve-1.0.conf", R_OK) = 0
3518  newfstatat(AT_FDCWD, "/usr/share/alsa/ucm2/conf.d/avs_rt5514/Google-Eve-1.0.conf", {st_mode=S_IFREG|0644, st_size=104, ...}, AT_SYMLINK_NOFOLLOW) = 0
3518  openat(AT_FDCWD, "/usr/share/alsa/ucm2/conf.d/avs_rt5514/Google-Eve-1.0.conf", O_RDONLY) = 41
3518  openat(AT_FDCWD, "/usr/share/alsa/ucm2/conf.d/avs_rt5514/Google-Eve-1.0-HiFi.conf", O_RDONLY) = 41
3518  access("/usr/share/alsa/ucm2/conf.d/avs_rt5663/Google-Eve-1.0.conf", R_OK) = 0
3518  newfstatat(AT_FDCWD, "/usr/share/alsa/ucm2/conf.d/avs_rt5663/Google-Eve-1.0.conf", {st_mode=S_IFREG|0644, st_size=104, ...}, AT_SYMLINK_NOFOLLOW) = 0
3518  openat(AT_FDCWD, "/usr/share/alsa/ucm2/conf.d/avs_rt5663/Google-Eve-1.0.conf", O_RDONLY) = 48
3518  openat(AT_FDCWD, "/usr/share/alsa/ucm2/conf.d/avs_rt5663/Google-Eve-1.0-HiFi.conf", O_RDONLY) = 48

@jmontleon
Copy link
Author

jmontleon commented May 24, 2024

OK, so they're not out of date.

So, I think there is something going wrong handling the compressed topology files.

The reason the 2023.09.2 didn't cause the splat and 2023.12.1 and newer did is simply because from 12.1 on the avs files are included.
https://src.fedoraproject.org/rpms/alsa-sof-firmware/c/3aaaa446c2e8d549a7735a33e99a8c38712ac69b?branch=f39

When we originally got this working back in November the topology files I was using were uncompressed so there was no issue and I had used those earlier today/last night to get 6.7 working, but the new alsa-sof-firmware package is problematic even with that old kernel so it's probably been an issue all along.

@jmontleon
Copy link
Author

Maybe something along the lines of this. It
is a bluetooth driver where, similar to what I am seeing, people found it worked when they uncompressed the firmware. In that case it was trying to modify a const in place.

I'm a little confused if it is the same though, because I tried zstd compression since the Fedora kernel supports it as well, and it worked. Maybe the two work a little differently.

Anyway, I can open a bug elsewhere if it makes sense, since this is deviating from the original request.

@amadeuszslawinski-intel
Copy link
Collaborator

Yes, I was also wondering a bit if it is because files are packed, will investigate this. I suspect it may be due to fact that we have caching mechanism in https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/sound/soc/intel/avs/utils.c?h=v6.10-rc1#n235

@amadeuszslawinski-intel
Copy link
Collaborator

So it seems that it was unrelated to caching mechanism. Fix is available at https://lore.kernel.org/linux-sound/20240603102818.36165-1-amadeuszx.slawinski@linux.intel.com/T/#t

intel-lab-lkp pushed a commit to intel-lab-lkp/linux that referenced this issue Jun 3, 2024
Most users after parsing a topology file, release memory used by it, so
having pointer references directly into topology file contents is wrong.
Use devm_kmemdup(), to allocate memory as needed.

Reported-by: Jason Montleon <jmontleo@redhat.com>
Link: thesofproject/avs-topology-xml#22 (comment)
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
intel-lab-lkp pushed a commit to intel-lab-lkp/linux that referenced this issue Jun 3, 2024
Instead of overriding existing memory strings that may be too short,
just allocate needed memory and point the route at it.

Reported-by: Jason Montleon <jmontleo@redhat.com>
Link: thesofproject/avs-topology-xml#22 (comment)
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
@jmontleon
Copy link
Author

I built a kernel with these patches and can confirm they fixed the issue.

plbossart pushed a commit to plbossart/sound that referenced this issue Jun 12, 2024
Most users after parsing a topology file, release memory used by it, so
having pointer references directly into topology file contents is wrong.
Use devm_kmemdup(), to allocate memory as needed.

Reported-by: Jason Montleon <jmontleo@redhat.com>
Link: thesofproject/avs-topology-xml#22 (comment)
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20240603102818.36165-2-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
plbossart pushed a commit to plbossart/sound that referenced this issue Jun 12, 2024
Instead of overriding existing memory strings that may be too short,
just allocate needed memory and point the route at it.

Reported-by: Jason Montleon <jmontleo@redhat.com>
Link: thesofproject/avs-topology-xml#22 (comment)
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20240603102818.36165-3-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
plbossart pushed a commit to plbossart/sound that referenced this issue Jun 12, 2024
Merge series from Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>:

Originally reported here:
thesofproject/avs-topology-xml#22 (comment)
There is various level of failure there, first of all when topology
loads routes, it points directly into FW file, but it may be freed after
topology load. After fixing the above, when avs driver parses topology
it should allocate its own memory, as target strings can be shorter than
needed. Also clean up soc_tplg_dapm_graph_elems_load() a bit.
@crojewsk-intel
Copy link
Collaborator

Looks like the issue is resolved. Thank you for your report @jmontleon, and Amadeusz for addressing it.

@crojewsk-intel
Copy link
Collaborator

For bookkeeping: the missing topology addressed with PR #25, commit i2s: Add RT5514 Topology [1]. The collateral i.e.: page fault addressed with patchset ASoC: topology: Fix route memory corruption on upstream [2].

[1]: d4d8936
[2]: https://lore.kernel.org/linux-sound/20240603102818.36165-1-amadeuszx.slawinski@linux.intel.com/T/#t

brauner pushed a commit to brauner/linux that referenced this issue Jul 18, 2024
Most users after parsing a topology file, release memory used by it, so
having pointer references directly into topology file contents is wrong.
Use devm_kmemdup(), to allocate memory as needed.

Reported-by: Jason Montleon <jmontleo@redhat.com>
Link: thesofproject/avs-topology-xml#22 (comment)
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20240603102818.36165-2-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
brauner pushed a commit to brauner/linux that referenced this issue Jul 18, 2024
Instead of overriding existing memory strings that may be too short,
just allocate needed memory and point the route at it.

Reported-by: Jason Montleon <jmontleo@redhat.com>
Link: thesofproject/avs-topology-xml#22 (comment)
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20240603102818.36165-3-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
brauner pushed a commit to brauner/linux that referenced this issue Jul 18, 2024
Merge series from Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>:

Originally reported here:
thesofproject/avs-topology-xml#22 (comment)
There is various level of failure there, first of all when topology
loads routes, it points directly into FW file, but it may be freed after
topology load. After fixing the above, when avs driver parses topology
it should allocate its own memory, as target strings can be shorter than
needed. Also clean up soc_tplg_dapm_graph_elems_load() a bit.
mj22226 pushed a commit to mj22226/linux that referenced this issue Jul 23, 2024
[ Upstream commit 97ab304 ]

Most users after parsing a topology file, release memory used by it, so
having pointer references directly into topology file contents is wrong.
Use devm_kmemdup(), to allocate memory as needed.

Reported-by: Jason Montleon <jmontleo@redhat.com>
Link: thesofproject/avs-topology-xml#22 (comment)
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20240603102818.36165-2-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
mj22226 pushed a commit to mj22226/linux that referenced this issue Jul 23, 2024
[ Upstream commit 97ab304 ]

Most users after parsing a topology file, release memory used by it, so
having pointer references directly into topology file contents is wrong.
Use devm_kmemdup(), to allocate memory as needed.

Reported-by: Jason Montleon <jmontleo@redhat.com>
Link: thesofproject/avs-topology-xml#22 (comment)
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20240603102818.36165-2-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
johnny-mnemonic pushed a commit to linux-ia64/linux-stable-rc that referenced this issue Jul 24, 2024
[ Upstream commit 97ab304 ]

Most users after parsing a topology file, release memory used by it, so
having pointer references directly into topology file contents is wrong.
Use devm_kmemdup(), to allocate memory as needed.

Reported-by: Jason Montleon <jmontleo@redhat.com>
Link: thesofproject/avs-topology-xml#22 (comment)
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20240603102818.36165-2-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
johnny-mnemonic pushed a commit to linux-ia64/linux-stable-rc that referenced this issue Jul 24, 2024
[ Upstream commit fd660b1 ]

Instead of overriding existing memory strings that may be too short,
just allocate needed memory and point the route at it.

Reported-by: Jason Montleon <jmontleo@redhat.com>
Link: thesofproject/avs-topology-xml#22 (comment)
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20240603102818.36165-3-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Whissi pushed a commit to Whissi/linux-stable that referenced this issue Jul 25, 2024
[ Upstream commit 97ab304 ]

Most users after parsing a topology file, release memory used by it, so
having pointer references directly into topology file contents is wrong.
Use devm_kmemdup(), to allocate memory as needed.

Reported-by: Jason Montleon <jmontleo@redhat.com>
Link: thesofproject/avs-topology-xml#22 (comment)
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20240603102818.36165-2-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Whissi pushed a commit to Whissi/linux-stable that referenced this issue Jul 25, 2024
[ Upstream commit 97ab304 ]

Most users after parsing a topology file, release memory used by it, so
having pointer references directly into topology file contents is wrong.
Use devm_kmemdup(), to allocate memory as needed.

Reported-by: Jason Montleon <jmontleo@redhat.com>
Link: thesofproject/avs-topology-xml#22 (comment)
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20240603102818.36165-2-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Whissi pushed a commit to Whissi/linux-stable that referenced this issue Jul 25, 2024
[ Upstream commit fd660b1 ]

Instead of overriding existing memory strings that may be too short,
just allocate needed memory and point the route at it.

Reported-by: Jason Montleon <jmontleo@redhat.com>
Link: thesofproject/avs-topology-xml#22 (comment)
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20240603102818.36165-3-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Whissi pushed a commit to Whissi/linux-stable that referenced this issue Jul 25, 2024
[ Upstream commit 97ab304 ]

Most users after parsing a topology file, release memory used by it, so
having pointer references directly into topology file contents is wrong.
Use devm_kmemdup(), to allocate memory as needed.

Reported-by: Jason Montleon <jmontleo@redhat.com>
Link: thesofproject/avs-topology-xml#22 (comment)
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20240603102818.36165-2-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
opsiff pushed a commit to opsiff/UOS-kernel that referenced this issue Jul 29, 2024
[ Upstream commit 97ab304ecd95c0b1703ff8c8c3956dc6e2afe8e1 ]

Most users after parsing a topology file, release memory used by it, so
having pointer references directly into topology file contents is wrong.
Use devm_kmemdup(), to allocate memory as needed.

Reported-by: Jason Montleon <jmontleo@redhat.com>
Link: thesofproject/avs-topology-xml#22 (comment)
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20240603102818.36165-2-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit ab5a6208b4d6872b1c6ecea1867940fc668cc76d)
Dangku pushed a commit to Dangku/sunxi-linux that referenced this issue Aug 7, 2024
[ Upstream commit 97ab304ecd95c0b1703ff8c8c3956dc6e2afe8e1 ]

Most users after parsing a topology file, release memory used by it, so
having pointer references directly into topology file contents is wrong.
Use devm_kmemdup(), to allocate memory as needed.

Reported-by: Jason Montleon <jmontleo@redhat.com>
Link: thesofproject/avs-topology-xml#22 (comment)
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20240603102818.36165-2-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: August <2819763+Dangku@users.noreply.github.com>
Avenger-285714 pushed a commit to deepin-community/kernel that referenced this issue Aug 12, 2024
[ Upstream commit 97ab304ecd95c0b1703ff8c8c3956dc6e2afe8e1 ]

Most users after parsing a topology file, release memory used by it, so
having pointer references directly into topology file contents is wrong.
Use devm_kmemdup(), to allocate memory as needed.

Reported-by: Jason Montleon <jmontleo@redhat.com>
Link: thesofproject/avs-topology-xml#22 (comment)
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20240603102818.36165-2-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit ab5a6208b4d6872b1c6ecea1867940fc668cc76d)
jhautbois pushed a commit to YoseliSAS/linux that referenced this issue Aug 21, 2024
Most users after parsing a topology file, release memory used by it, so
having pointer references directly into topology file contents is wrong.
Use devm_kmemdup(), to allocate memory as needed.

Reported-by: Jason Montleon <jmontleo@redhat.com>
Link: thesofproject/avs-topology-xml#22 (comment)
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20240603102818.36165-2-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
jhautbois pushed a commit to YoseliSAS/linux that referenced this issue Aug 21, 2024
Instead of overriding existing memory strings that may be too short,
just allocate needed memory and point the route at it.

Reported-by: Jason Montleon <jmontleo@redhat.com>
Link: thesofproject/avs-topology-xml#22 (comment)
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20240603102818.36165-3-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
wanghao75 pushed a commit to openeuler-mirror/kernel that referenced this issue Sep 12, 2024
mainline inclusion
from mainline-v6.10-rc6
commit 97ab304ecd95c0b1703ff8c8c3956dc6e2afe8e1
category: bugfix
bugzilla: https://gitee.com/src-openeuler/kernel/issues/IAGELE
CVE: CVE-2024-41069

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=97ab304ecd95c0b1703ff8c8c3956dc6e2afe8e1

--------------------------------

Most users after parsing a topology file, release memory used by it, so
having pointer references directly into topology file contents is wrong.
Use devm_kmemdup(), to allocate memory as needed.

Reported-by: Jason Montleon <jmontleo@redhat.com>
Link: thesofproject/avs-topology-xml#22 (comment)
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Conflicts:
	sound/soc/soc-topology.c
[Resolve conflicts due to some cleanup commits not backported]
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20240603102818.36165-2-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Fixes: 8a97823 ("ASoC: topology: Add topology core")
Signed-off-by: Zheng Yejian <zhengyejian1@huawei.com>
wanghao75 pushed a commit to openeuler-mirror/kernel that referenced this issue Sep 12, 2024
mainline inclusion
from mainline-v6.10-rc6
commit 97ab304ecd95c0b1703ff8c8c3956dc6e2afe8e1
category: bugfix
bugzilla: https://gitee.com/src-openeuler/kernel/issues/IAGELE
CVE: CVE-2024-41069

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=97ab304ecd95c0b1703ff8c8c3956dc6e2afe8e1

--------------------------------

Most users after parsing a topology file, release memory used by it, so
having pointer references directly into topology file contents is wrong.
Use devm_kmemdup(), to allocate memory as needed.

Reported-by: Jason Montleon <jmontleo@redhat.com>
Link: thesofproject/avs-topology-xml#22 (comment)
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Conflicts:
	sound/soc/soc-topology.c
[Resolve conflicts due to some cleanup commits not backported]
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20240603102818.36165-2-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Fixes: 8a97823 ("ASoC: topology: Add topology core")
Signed-off-by: Zheng Yejian <zhengyejian1@huawei.com>
wanghao75 pushed a commit to openeuler-mirror/kernel that referenced this issue Sep 12, 2024
mainline inclusion
from mainline-v6.10-rc6
commit 97ab304ecd95c0b1703ff8c8c3956dc6e2afe8e1
category: bugfix
bugzilla: https://gitee.com/src-openeuler/kernel/issues/IAGELE
CVE: CVE-2024-41069

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=97ab304ecd95c0b1703ff8c8c3956dc6e2afe8e1

--------------------------------

Most users after parsing a topology file, release memory used by it, so
having pointer references directly into topology file contents is wrong.
Use devm_kmemdup(), to allocate memory as needed.

Reported-by: Jason Montleon <jmontleo@redhat.com>
Link: thesofproject/avs-topology-xml#22 (comment)
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Conflicts:
	sound/soc/soc-topology.c
[Resolve conflicts due to some cleanup commits not backported]
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20240603102818.36165-2-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Fixes: 8a97823 ("ASoC: topology: Add topology core")
Signed-off-by: Zheng Yejian <zhengyejian1@huawei.com>
tuxedo-bot pushed a commit to tuxedocomputers/linux that referenced this issue Sep 13, 2024
BugLink: https://bugs.launchpad.net/bugs/2078304

[ Upstream commit 97ab304 ]

Most users after parsing a topology file, release memory used by it, so
having pointer references directly into topology file contents is wrong.
Use devm_kmemdup(), to allocate memory as needed.

Reported-by: Jason Montleon <jmontleo@redhat.com>
Link: thesofproject/avs-topology-xml#22 (comment)
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20240603102818.36165-2-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Portia Stephens <portia.stephens@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
tuxedo-bot pushed a commit to tuxedocomputers/linux that referenced this issue Sep 13, 2024
BugLink: https://bugs.launchpad.net/bugs/2078304

[ Upstream commit fd660b1 ]

Instead of overriding existing memory strings that may be too short,
just allocate needed memory and point the route at it.

Reported-by: Jason Montleon <jmontleo@redhat.com>
Link: thesofproject/avs-topology-xml#22 (comment)
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20240603102818.36165-3-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Portia Stephens <portia.stephens@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
tuxedo-bot pushed a commit to tuxedocomputers/linux that referenced this issue Sep 27, 2024
BugLink: https://bugs.launchpad.net/bugs/2078304

[ Upstream commit 97ab304 ]

Most users after parsing a topology file, release memory used by it, so
having pointer references directly into topology file contents is wrong.
Use devm_kmemdup(), to allocate memory as needed.

Reported-by: Jason Montleon <jmontleo@redhat.com>
Link: thesofproject/avs-topology-xml#22 (comment)
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20240603102818.36165-2-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Portia Stephens <portia.stephens@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
tuxedo-bot pushed a commit to tuxedocomputers/linux that referenced this issue Sep 27, 2024
BugLink: https://bugs.launchpad.net/bugs/2078304

[ Upstream commit fd660b1 ]

Instead of overriding existing memory strings that may be too short,
just allocate needed memory and point the route at it.

Reported-by: Jason Montleon <jmontleo@redhat.com>
Link: thesofproject/avs-topology-xml#22 (comment)
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20240603102818.36165-3-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Portia Stephens <portia.stephens@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants