mbox series

[SRU,Jammy,0/2] alsa: soc: the kernel print UBSAN calltrace on the machine with cs35l41 codec

Message ID 20221110012532.8796-1-hui.wang@canonical.com
Headers show
Series alsa: soc: the kernel print UBSAN calltrace on the machine with cs35l41 codec | expand

Message

Hui Wang Nov. 10, 2022, 1:25 a.m. UTC
BugLink: https://bugs.launchpad.net/bugs/1996121

The cs35l41 codec driver was backported to Jammy kernel a couple of
months ago, recently the Jammy kernel was adopted as the hwe kernel
for OEM machines and with this kernel the UBSAN calltrace was seen,
need to backport these 2 patches. Kinetic kernel already has the
patches, so this SRU is only for Jammy kernel.

[Impact]
Install the 5.15 hwe kernel on the machines with cs35l41
codec, after booting and check the dmesg, there is a UBSAN calltrace.

[Fix]
Backport 2 patches from mainline kernel to fix this problem.

[Test]
boot the patched kernel on the machine, check the dmesg, there
is no UBSAN calltrace, and test the audio functions, all input
and output devices coudl work as well as before.


[Where problems could occur]
The patch only affects the cirruslogic asoc codec driver, if it
could introduce the regression, it will be on the machines with
cs codec, and it will make the audio driver initialization fail
and make the system lose the audio function. But this possibility
is very low, we tested the patches on many oem machines, all
worked well.


Hui Wang (2):
  ASoC: cs35l41: Add one more variable in the debug log
  ASoC: cs35l41: Fix an out-of-bounds access in otp_packed_element_t

 include/sound/cs35l41.h        |  1 -
 sound/soc/codecs/cs35l41-lib.c | 18 +++++++++---------
 2 files changed, 9 insertions(+), 10 deletions(-)

Comments

Tim Gardner Nov. 10, 2022, 3:03 p.m. UTC | #1
On 11/9/22 6:25 PM, Hui Wang wrote:
> BugLink: https://bugs.launchpad.net/bugs/1996121
> 
> The cs35l41 codec driver was backported to Jammy kernel a couple of
> months ago, recently the Jammy kernel was adopted as the hwe kernel
> for OEM machines and with this kernel the UBSAN calltrace was seen,
> need to backport these 2 patches. Kinetic kernel already has the
> patches, so this SRU is only for Jammy kernel.
> 
> [Impact]
> Install the 5.15 hwe kernel on the machines with cs35l41
> codec, after booting and check the dmesg, there is a UBSAN calltrace.
> 
> [Fix]
> Backport 2 patches from mainline kernel to fix this problem.
> 
> [Test]
> boot the patched kernel on the machine, check the dmesg, there
> is no UBSAN calltrace, and test the audio functions, all input
> and output devices coudl work as well as before.
> 
> 
> [Where problems could occur]
> The patch only affects the cirruslogic asoc codec driver, if it
> could introduce the regression, it will be on the machines with
> cs codec, and it will make the audio driver initialization fail
> and make the system lose the audio function. But this possibility
> is very low, we tested the patches on many oem machines, all
> worked well.
> 
> 
> Hui Wang (2):
>    ASoC: cs35l41: Add one more variable in the debug log
>    ASoC: cs35l41: Fix an out-of-bounds access in otp_packed_element_t
> 
>   include/sound/cs35l41.h        |  1 -
>   sound/soc/codecs/cs35l41-lib.c | 18 +++++++++---------
>   2 files changed, 9 insertions(+), 10 deletions(-)
> 
Acked-by: Tim Gardner <tim.gardner@canonical.com>
Stefan Bader Nov. 11, 2022, 10:15 a.m. UTC | #2
On 10.11.22 02:25, Hui Wang wrote:
> BugLink: https://bugs.launchpad.net/bugs/1996121
> 
> The cs35l41 codec driver was backported to Jammy kernel a couple of
> months ago, recently the Jammy kernel was adopted as the hwe kernel
> for OEM machines and with this kernel the UBSAN calltrace was seen,
> need to backport these 2 patches. Kinetic kernel already has the
> patches, so this SRU is only for Jammy kernel.
> 
> [Impact]
> Install the 5.15 hwe kernel on the machines with cs35l41
> codec, after booting and check the dmesg, there is a UBSAN calltrace.
> 
> [Fix]
> Backport 2 patches from mainline kernel to fix this problem.
> 
> [Test]
> boot the patched kernel on the machine, check the dmesg, there
> is no UBSAN calltrace, and test the audio functions, all input
> and output devices coudl work as well as before.
> 
> 
> [Where problems could occur]
> The patch only affects the cirruslogic asoc codec driver, if it
> could introduce the regression, it will be on the machines with
> cs codec, and it will make the audio driver initialization fail
> and make the system lose the audio function. But this possibility
> is very low, we tested the patches on many oem machines, all
> worked well.
> 
> 
> Hui Wang (2):
>    ASoC: cs35l41: Add one more variable in the debug log
>    ASoC: cs35l41: Fix an out-of-bounds access in otp_packed_element_t
> 
>   include/sound/cs35l41.h        |  1 -
>   sound/soc/codecs/cs35l41-lib.c | 18 +++++++++---------
>   2 files changed, 9 insertions(+), 10 deletions(-)
> 

Acked-by: Stefan Bader <stefan.bader@canonical.com>
Stefan Bader Nov. 11, 2022, 11:45 a.m. UTC | #3
On 10.11.22 02:25, Hui Wang wrote:
> BugLink: https://bugs.launchpad.net/bugs/1996121
> 
> The cs35l41 codec driver was backported to Jammy kernel a couple of
> months ago, recently the Jammy kernel was adopted as the hwe kernel
> for OEM machines and with this kernel the UBSAN calltrace was seen,
> need to backport these 2 patches. Kinetic kernel already has the
> patches, so this SRU is only for Jammy kernel.
> 
> [Impact]
> Install the 5.15 hwe kernel on the machines with cs35l41
> codec, after booting and check the dmesg, there is a UBSAN calltrace.
> 
> [Fix]
> Backport 2 patches from mainline kernel to fix this problem.
> 
> [Test]
> boot the patched kernel on the machine, check the dmesg, there
> is no UBSAN calltrace, and test the audio functions, all input
> and output devices coudl work as well as before.
> 
> 
> [Where problems could occur]
> The patch only affects the cirruslogic asoc codec driver, if it
> could introduce the regression, it will be on the machines with
> cs codec, and it will make the audio driver initialization fail
> and make the system lose the audio function. But this possibility
> is very low, we tested the patches on many oem machines, all
> worked well.
> 
> 
> Hui Wang (2):
>    ASoC: cs35l41: Add one more variable in the debug log
>    ASoC: cs35l41: Fix an out-of-bounds access in otp_packed_element_t
> 
>   include/sound/cs35l41.h        |  1 -
>   sound/soc/codecs/cs35l41-lib.c | 18 +++++++++---------
>   2 files changed, 9 insertions(+), 10 deletions(-)
> 

Applied to jammy:linux/master-next. Thanks.

-Stefan