* [d-kernel] [PATCH 0/2] ASoC: codecs: fix ALT patches (build warning and null-ptr-deref) @ 2024-03-07 8:50 kovalev 2024-03-07 8:50 ` [d-kernel] [PATCH 1/2] Revert "ASoC: Intel: sof_es8336: add ES8326 component support" kovalev ` (2 more replies) 0 siblings, 3 replies; 6+ messages in thread From: kovalev @ 2024-03-07 8:50 UTC (permalink / raw) To: devel-kernel Добрый день. Эти патчи для всех un-def ядер 6.1. [PATCH 1/2] Revert "ASoC: Intel: sof_es8336: add ES8326 component [PATCH 2/2] ASoC: codecs: fix warning for the es8316 codec build (ALT) ^ permalink raw reply [flat|nested] 6+ messages in thread
* [d-kernel] [PATCH 1/2] Revert "ASoC: Intel: sof_es8336: add ES8326 component support" 2024-03-07 8:50 [d-kernel] [PATCH 0/2] ASoC: codecs: fix ALT patches (build warning and null-ptr-deref) kovalev @ 2024-03-07 8:50 ` kovalev 2024-03-07 9:44 ` Vitaly Chikunov 2024-03-07 8:50 ` [d-kernel] [PATCH 2/2] ASoC: codecs: fix warning for the es8316 codec build (ALT) kovalev 2024-04-15 22:32 ` [d-kernel] [PATCH 0/2] ASoC: codecs: fix ALT patches (build warning and null-ptr-deref) Vitaly Chikunov 2 siblings, 1 reply; 6+ messages in thread From: kovalev @ 2024-03-07 8:50 UTC (permalink / raw) To: devel-kernel From: Vasiliy Kovalev <kovalev@altlinux.org> This reverts commit 15942fcf7b5fa138e8e7b597f327d252f7895d2c. Remove an outdated ALT patch that leads to null pointer dereference: -- [ 5.784881] RIP: 0010:sof_es8316_exit+0x1b/0x30 [snd_soc_sof_es8336] [ 5.785397] Code: 08 5b c3 cc cc cc cc 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 8b 47 10 31 f6 8b 50 18 48 8b 87 18 06 00 00 48 8b 04 d0 31 d2 <48> 8b 78 58 e9 5c ec e6 ff 66 66 2e 0f 1f 84 00 00 00 00 00 90 0f -- [ 5.794869] ? asm_exc_page_fault+0x22/0x30 [ 5.795424] ? sof_es8316_exit+0x1b/0x30 [snd_soc_sof_es8336] [ 5.796205] snd_soc_remove_pcm_runtime+0x16/0x30 [snd_soc_core] [ 5.797141] snd_soc_add_pcm_runtime.cold+0x29/0x10a [snd_soc_core] [ 5.798096] snd_soc_bind_card+0x34c/0xb70 [snd_soc_core] [ 5.798912] ? __kmalloc_node_track_caller+0x4c/0x130 [ 5.799592] ? devm_snd_soc_register_card+0x90/0x90 [snd_soc_core] [ 5.800287] devm_snd_soc_register_card+0x43/0x90 [snd_soc_core] [ 5.800984] sof_es8336_probe.cold+0x968/0x9f1 [snd_soc_sof_es8336] [ 5.801665] platform_probe+0x3c/0xa0 -- [ 5.820537] </TASK> Signed-off-by: Vasiliy Kovalev <kovalev@altlinux.org --- sound/soc/intel/boards/sof_es8336.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/sound/soc/intel/boards/sof_es8336.c b/sound/soc/intel/boards/sof_es8336.c index 6b8b4596e62e92..e22d767b6e97a3 100644 --- a/sound/soc/intel/boards/sof_es8336.c +++ b/sound/soc/intel/boards/sof_es8336.c @@ -682,17 +682,15 @@ static int sof_es8336_probe(struct platform_device *pdev) snprintf(codec_name, sizeof(codec_name), "i2c-%s", acpi_dev_name(adev)); dai_links[0].codecs->name = codec_name; + + /* also fixup codec dai name if relevant */ + if (!strncmp(mach->id, "ESSX8326", SND_ACPI_I2C_ID_LEN)) + dai_links[0].codecs->dai_name = "ES8326 HiFi"; } else { dev_err(dev, "Error cannot find '%s' dev\n", mach->id); return -ENXIO; } - card->components = devm_kasprintf(dev, GFP_KERNEL, "spk:es83%d6", - strstr(codec_name, "ESSX8326") - ? 1 : 2); - if (!card->components) - return -ENOMEM; - codec_dev = acpi_get_first_physical_node(adev); acpi_dev_put(adev); if (!codec_dev) -- 2.33.8 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [d-kernel] [PATCH 1/2] Revert "ASoC: Intel: sof_es8336: add ES8326 component support" 2024-03-07 8:50 ` [d-kernel] [PATCH 1/2] Revert "ASoC: Intel: sof_es8336: add ES8326 component support" kovalev @ 2024-03-07 9:44 ` Vitaly Chikunov 2024-03-07 10:12 ` Vasiliy Kovalev 0 siblings, 1 reply; 6+ messages in thread From: Vitaly Chikunov @ 2024-03-07 9:44 UTC (permalink / raw) To: ALT Linux kernel packages development On Thu, Mar 07, 2024 at 11:50:41AM +0300, kovalev@altlinux.org wrote: > From: Vasiliy Kovalev <kovalev@altlinux.org> > > This reverts commit 15942fcf7b5fa138e8e7b597f327d252f7895d2c. > > Remove an outdated ALT patch that leads to null pointer dereference: > -- > [ 5.784881] RIP: 0010:sof_es8316_exit+0x1b/0x30 [snd_soc_sof_es8336] > [ 5.785397] Code: 08 5b c3 cc cc cc cc 0f 1f 84 00 00 00 00 00 0f 1f > 44 00 00 48 8b 47 10 31 f6 8b 50 18 48 8b 87 18 06 > 00 00 48 8b 04 d0 31 d2 <48> 8b 78 58 e9 5c ec e6 > ff 66 66 2e 0f 1f 84 00 00 00 00 00 90 0f > -- > [ 5.794869] ? asm_exc_page_fault+0x22/0x30 > [ 5.795424] ? sof_es8316_exit+0x1b/0x30 [snd_soc_sof_es8336] > [ 5.796205] snd_soc_remove_pcm_runtime+0x16/0x30 [snd_soc_core] > [ 5.797141] snd_soc_add_pcm_runtime.cold+0x29/0x10a [snd_soc_core] > [ 5.798096] snd_soc_bind_card+0x34c/0xb70 [snd_soc_core] > [ 5.798912] ? __kmalloc_node_track_caller+0x4c/0x130 > [ 5.799592] ? devm_snd_soc_register_card+0x90/0x90 [snd_soc_core] > [ 5.800287] devm_snd_soc_register_card+0x43/0x90 [snd_soc_core] > [ 5.800984] sof_es8336_probe.cold+0x968/0x9f1 [snd_soc_sof_es8336] > [ 5.801665] platform_probe+0x3c/0xa0 > -- > [ 5.820537] </TASK> Отревертить патч, который крашит наше ядро это хорошо. Но тут вопрос - исходный коммит - кем он был рецензирован? Была ли попытка послать его в upstream на review? Прошу далее слать подобные коммиты на review в upstream. Upstream first! После приема или review - людей, которые хорошо понимают ту подсистему, которую он меняет - или ждем его прохождения в stable, (но понимая, что это может не произойти так как Грег может не принимать патчи по не понятным причинам и без объяснений с фиксами известных багов которые даже есть в mainline), или принимаем сами - со ссылкой на lore.kernel.org с обсуждением патча или на sha1 в mainline. Но важно, чтоб коммит, как и со stable ядрами, сначала должен попасть в mainline - или очень желательно, если объективные причины не препятствуют его попаданию, или если он действительно не ALT специфичный, например как AltHa. Иначе, наши ядра перестанут быть стабильными, а превратятся в экспериментальный сборник нагугленных патчей из инета. Мне кажется, что это было бы не очень ответственно по отношению к пользователям. Хотелось бы, чтоб наши ядра были качеством не ниже чем upstream stable/longterm ядра. > > Signed-off-by: Vasiliy Kovalev <kovalev@altlinux.org > --- > sound/soc/intel/boards/sof_es8336.c | 10 ++++------ > 1 file changed, 4 insertions(+), 6 deletions(-) > > diff --git a/sound/soc/intel/boards/sof_es8336.c b/sound/soc/intel/boards/sof_es8336.c > index 6b8b4596e62e92..e22d767b6e97a3 100644 > --- a/sound/soc/intel/boards/sof_es8336.c > +++ b/sound/soc/intel/boards/sof_es8336.c > @@ -682,17 +682,15 @@ static int sof_es8336_probe(struct platform_device *pdev) > snprintf(codec_name, sizeof(codec_name), > "i2c-%s", acpi_dev_name(adev)); > dai_links[0].codecs->name = codec_name; > + > + /* also fixup codec dai name if relevant */ > + if (!strncmp(mach->id, "ESSX8326", SND_ACPI_I2C_ID_LEN)) > + dai_links[0].codecs->dai_name = "ES8326 HiFi"; > } else { > dev_err(dev, "Error cannot find '%s' dev\n", mach->id); > return -ENXIO; > } > > - card->components = devm_kasprintf(dev, GFP_KERNEL, "spk:es83%d6", > - strstr(codec_name, "ESSX8326") > - ? 1 : 2); > - if (!card->components) > - return -ENOMEM; > - > codec_dev = acpi_get_first_physical_node(adev); > acpi_dev_put(adev); > if (!codec_dev) > -- > 2.33.8 > > _______________________________________________ > devel-kernel mailing list > devel-kernel@lists.altlinux.org > https://lists.altlinux.org/mailman/listinfo/devel-kernel ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [d-kernel] [PATCH 1/2] Revert "ASoC: Intel: sof_es8336: add ES8326 component support" 2024-03-07 9:44 ` Vitaly Chikunov @ 2024-03-07 10:12 ` Vasiliy Kovalev 0 siblings, 0 replies; 6+ messages in thread From: Vasiliy Kovalev @ 2024-03-07 10:12 UTC (permalink / raw) To: devel-kernel 07.03.2024 12:44, Vitaly Chikunov wrote: > On Thu, Mar 07, 2024 at 11:50:41AM +0300, kovalev@altlinux.org wrote: >> From: Vasiliy Kovalev <kovalev@altlinux.org> >> >> This reverts commit 15942fcf7b5fa138e8e7b597f327d252f7895d2c. >> >> Remove an outdated ALT patch that leads to null pointer dereference: >> -- >> [ 5.784881] RIP: 0010:sof_es8316_exit+0x1b/0x30 [snd_soc_sof_es8336] >> [ 5.785397] Code: 08 5b c3 cc cc cc cc 0f 1f 84 00 00 00 00 00 0f 1f >> 44 00 00 48 8b 47 10 31 f6 8b 50 18 48 8b 87 18 06 >> 00 00 48 8b 04 d0 31 d2 <48> 8b 78 58 e9 5c ec e6 >> ff 66 66 2e 0f 1f 84 00 00 00 00 00 90 0f >> -- >> [ 5.794869] ? asm_exc_page_fault+0x22/0x30 >> [ 5.795424] ? sof_es8316_exit+0x1b/0x30 [snd_soc_sof_es8336] >> [ 5.796205] snd_soc_remove_pcm_runtime+0x16/0x30 [snd_soc_core] >> [ 5.797141] snd_soc_add_pcm_runtime.cold+0x29/0x10a [snd_soc_core] >> [ 5.798096] snd_soc_bind_card+0x34c/0xb70 [snd_soc_core] >> [ 5.798912] ? __kmalloc_node_track_caller+0x4c/0x130 >> [ 5.799592] ? devm_snd_soc_register_card+0x90/0x90 [snd_soc_core] >> [ 5.800287] devm_snd_soc_register_card+0x43/0x90 [snd_soc_core] >> [ 5.800984] sof_es8336_probe.cold+0x968/0x9f1 [snd_soc_sof_es8336] >> [ 5.801665] platform_probe+0x3c/0xa0 >> -- >> [ 5.820537] </TASK> > > Отревертить патч, который крашит наше ядро это хорошо. Но тут вопрос - > исходный коммит - кем он был рецензирован? Была ли попытка послать его в > upstream на review? Коммит 15942fcf7b5f "ASoC: Intel: sof_es8336: add ES8326 component support" изначально разрабатывался для ядра 5.15 и был портирован в 6.1 вместе с другими патчами с целью пофиксить те же проблемы совместимости, но из-за отсутствия возможности протестировать на то время, этот патч оказался лишним и ломающим систему. Тогда же этот патч в апстрим не отправлялся. > Прошу далее слать подобные коммиты на review в upstream. Upstream first! Эти патчи только для альтовых 6.1 un-def. А в целом суть ясна. > После приема или review - людей, которые хорошо понимают ту подсистему, > которую он меняет - или ждем его прохождения в stable, (но понимая, что > это может не произойти так как Грег может не принимать патчи по не > понятным причинам и без объяснений с фиксами известных багов которые > даже есть в mainline), или принимаем сами - со ссылкой на > lore.kernel.org с обсуждением патча или на sha1 в mainline. > > Но важно, чтоб коммит, как и со stable ядрами, сначала должен попасть в > mainline - или очень желательно, если объективные причины не > препятствуют его попаданию, или если он действительно не ALT > специфичный, например как AltHa. > > Иначе, наши ядра перестанут быть стабильными, а превратятся в > экспериментальный сборник нагугленных патчей из инета. Мне кажется, что > это было бы не очень ответственно по отношению к пользователям. Хотелось > бы, чтоб наши ядра были качеством не ниже чем upstream stable/longterm > ядра. -- Regards, Vasiliy Kovalev ^ permalink raw reply [flat|nested] 6+ messages in thread
* [d-kernel] [PATCH 2/2] ASoC: codecs: fix warning for the es8316 codec build (ALT) 2024-03-07 8:50 [d-kernel] [PATCH 0/2] ASoC: codecs: fix ALT patches (build warning and null-ptr-deref) kovalev 2024-03-07 8:50 ` [d-kernel] [PATCH 1/2] Revert "ASoC: Intel: sof_es8336: add ES8326 component support" kovalev @ 2024-03-07 8:50 ` kovalev 2024-04-15 22:32 ` [d-kernel] [PATCH 0/2] ASoC: codecs: fix ALT patches (build warning and null-ptr-deref) Vitaly Chikunov 2 siblings, 0 replies; 6+ messages in thread From: kovalev @ 2024-03-07 8:50 UTC (permalink / raw) To: devel-kernel From: Vasiliy Kovalev <kovalev@altlinux.org> sound/soc/codecs/es8316.c:517:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement] 517 | static u8 only_one = 0; | ^~~~~~ Fixes: f63b2a193575f82 ("ASoC: AMD: add ACP machine driver for ES8336") Signed-off-by: Vasiliy Kovalev <kovalev@altlinux.org> --- sound/soc/codecs/es8316.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sound/soc/codecs/es8316.c b/sound/soc/codecs/es8316.c index f6e3f0e7e56583..621084fbc87708 100644 --- a/sound/soc/codecs/es8316.c +++ b/sound/soc/codecs/es8316.c @@ -460,6 +460,8 @@ static int es8316_pcm_startup(struct snd_pcm_substream *substream, return 0; } +static u8 static_flag; + static int es8316_pcm_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params, struct snd_soc_dai *dai) @@ -513,9 +515,8 @@ static int es8316_pcm_hw_params(struct snd_pcm_substream *substream, return -EINVAL; } - static u8 only_one = 0; - if (!only_one) { - only_one = 1; + if (!static_flag) { + static_flag = 1; if (mclk_div == 2) dev_info(component->dev, "Activating MCLK div by 2\n"); -- 2.33.8 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [d-kernel] [PATCH 0/2] ASoC: codecs: fix ALT patches (build warning and null-ptr-deref) 2024-03-07 8:50 [d-kernel] [PATCH 0/2] ASoC: codecs: fix ALT patches (build warning and null-ptr-deref) kovalev 2024-03-07 8:50 ` [d-kernel] [PATCH 1/2] Revert "ASoC: Intel: sof_es8336: add ES8326 component support" kovalev 2024-03-07 8:50 ` [d-kernel] [PATCH 2/2] ASoC: codecs: fix warning for the es8316 codec build (ALT) kovalev @ 2024-04-15 22:32 ` Vitaly Chikunov 2 siblings, 0 replies; 6+ messages in thread From: Vitaly Chikunov @ 2024-04-15 22:32 UTC (permalink / raw) To: ALT Linux kernel packages development On Thu, Mar 07, 2024 at 11:50:40AM +0300, kovalev@altlinux.org wrote: > Добрый день. > > Эти патчи для всех un-def ядер 6.1. > > [PATCH 1/2] Revert "ASoC: Intel: sof_es8336: add ES8326 component > [PATCH 2/2] ASoC: codecs: fix warning for the es8316 codec build (ALT) Applied, thanks > > _______________________________________________ > devel-kernel mailing list > devel-kernel@lists.altlinux.org > https://lists.altlinux.org/mailman/listinfo/devel-kernel ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-04-15 22:32 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2024-03-07 8:50 [d-kernel] [PATCH 0/2] ASoC: codecs: fix ALT patches (build warning and null-ptr-deref) kovalev 2024-03-07 8:50 ` [d-kernel] [PATCH 1/2] Revert "ASoC: Intel: sof_es8336: add ES8326 component support" kovalev 2024-03-07 9:44 ` Vitaly Chikunov 2024-03-07 10:12 ` Vasiliy Kovalev 2024-03-07 8:50 ` [d-kernel] [PATCH 2/2] ASoC: codecs: fix warning for the es8316 codec build (ALT) kovalev 2024-04-15 22:32 ` [d-kernel] [PATCH 0/2] ASoC: codecs: fix ALT patches (build warning and null-ptr-deref) Vitaly Chikunov
ALT Linux kernel packages development This inbox may be cloned and mirrored by anyone: git clone --mirror http://lore.altlinux.org/devel-kernel/0 devel-kernel/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 devel-kernel devel-kernel/ http://lore.altlinux.org/devel-kernel \ devel-kernel@altlinux.org devel-kernel@altlinux.ru devel-kernel@altlinux.com public-inbox-index devel-kernel Example config snippet for mirrors. Newsgroup available over NNTP: nntp://lore.altlinux.org/org.altlinux.lists.devel-kernel AGPL code for this site: git clone https://public-inbox.org/public-inbox.git