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-next>] [day] [month] [year] [list]
Message-ID: <874jx7vdhs.wl-tiwai@suse.de>
Date:   Fri, 16 Sep 2022 12:07:43 +0200
From:   Takashi Iwai <tiwai@...e.de>
To:     Pshou <pshou@...ltek.com>
Cc:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "Takashi Iwai" <tiwai@...e.de>,
        "Arava, Jairaj" <jairaj.arava@...el.com>,
        "Nujella, Sathyanarayana" <sathyanarayana.nujella@...el.com>,
        "Prabhu, Swarna" <swarna.prabhu@...el.com>,
        "Afzal, Naeem M" <naeem.m.afzal@...el.com>,
        Shui-Wen Hsu <swhsu4021@...ltek.com>,
        "Perati, RK" <rk.perati@...el.com>,
        "Mandri, Padmashree" <padmashree.mandri@...el.com>,
        Kailang <kailang@...ltek.com>
Subject: Re: Sarien/Dorset device: After system resumed from suspend, 3.5m jack is still shown as detected when unplugged during suspend 

On Fri, 16 Sep 2022 07:34:38 +0200,
Pshou wrote:
> 
> 
> Hi Takashi Iwai:
> 
> Can you help me update this PATCH file?
> 
> Check if ignore unsol events duing system suspend/resume and NVIDIA chip in
> hda_codec_unsol_event().
> 
> Signed-off-by:PeiSen Hou<pshou@...ltek.com>
> 
> Signed-off-by: Jairaj Arava <jairaj.arava@...el.com>
> 
> diff --git a/sound/pci/hda/hda_bind.c b/sound/pci/hda/hda_bind.c
> 
> index 1a868dd9dc4b..75560ff6eb83 100644
> 
> --- a/sound/pci/hda/hda_bind.c
> 
> +++ b/sound/pci/hda/hda_bind.c
> 
> @@ -50,7 +50,8 @@ static void hda_codec_unsol_event(struct hdac_device *dev,
> unsigned int ev)
> 
>        /* ignore unsol events during system suspend/resume */
> 
>       if (codec->core.dev.power.power_state.event != PM_EVENT_ON)
> 
> -               return;
> 
> +              if (codec->core.vendor_id == PCI_VENDOR_ID_NVIDIA)
> 
> +                      return;
> 
>        if (codec->patch_ops.unsol_event)
> 
>               codec->patch_ops.unsol_event(codec, ev);

Hmm, this doesn't look safe.  We also want to avoid the unsol event
handling during the PM state transition, too.  So, if any, this should
be allowed only at PM_EVENT_SUSPEND or PM_EVENT_HIBERNATE.

Also, checking the codec vendor ID here is no good way.  We may add a
new flag for the special behavior (either allowing the unsol handling
or prohibiting).

But, from your patch, I don't see any reason *why* this has to be
changed in that way.  Could you give more backgrounds?


thanks,

Takashi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ