lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <s5hczi6l8fz.wl-tiwai@suse.de>
Date:   Mon, 28 Mar 2022 11:42:24 +0200
From:   Takashi Iwai <tiwai@...e.de>
To:     Mohan Kumar <mkumard@...dia.com>
Cc:     <tiwai@...e.com>, <kai.vehmanen@...ux.intel.com>, <perex@...ex.cz>,
        <ville.syrjala@...ux.intel.com>, <alsa-devel@...a-project.org>,
        <linux-kernel@...r.kernel.org>, <thierry.reding@...il.com>,
        <jonathanh@...dia.com>
Subject: Re: [PATCH] ALSA: hda: Avoid unsol event during RPM suspending

On Mon, 28 Mar 2022 11:14:11 +0200,
Mohan Kumar wrote:
> 
> There is a corner case with unsol event handling during codec runtime
> suspending state. When the codec runtime suspend call initiated, the
> codec->in_pm atomic variable would be 0, currently the codec runtime
> suspend function calls snd_hdac_enter_pm() which will just increments
> the codec->in_pm atomic variable. Consider unsol event happened just
> after this step and before snd_hdac_leave_pm() in the codec runtime
> suspend function. The snd_hdac_power_up_pm() in the unsol event
> flow in hdmi_present_sense_via_verbs() function would just increment
> the codec->in_pm atomic variable without calling pm_runtime_get_sync
> function.
> 
> As codec runtime suspend flow is already in progress and in parallel
> unsol event is also accessing the codec verbs, as soon as codec
> suspend flow completes and clocks are  switched off before completing
> the unsol event handling as both functions doesn't wait for each other.
> This will result in below errors
> 
> [  589.428020] tegra-hda 3510000.hda: azx_get_response timeout, switching
> to polling mode: last cmd=0x505f2f57
> [  589.428344] tegra-hda 3510000.hda: spurious response 0x80000074:0x5,
> last cmd=0x505f2f57
> [  589.428547] tegra-hda 3510000.hda: spurious response 0x80000065:0x5,
> last cmd=0x505f2f57
> 
> To avoid this, the unsol event flow should not perform any codec verb
> related operations during RPM_SUSPENDING state.
> 
> Signed-off-by: Mohan Kumar <mkumard@...dia.com>

Thanks, that's a hairy problem...

The logic sounds good, but can we check the PM state before calling
snd_hda_power_up_pm()?


Takashi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ