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]
Date:   Mon, 31 Jan 2022 15:57:04 +0100
From:   Takashi Iwai <tiwai@...e.de>
To:     Alexander Sergeyev <sergeev917@...il.com>
Cc:     Jeremy Szu <jeremy.szu@...onical.com>, tiwai@...e.com,
        "moderated list:SOUND" <alsa-devel@...a-project.org>,
        Kailang Yang <kailang@...ltek.com>,
        open list <linux-kernel@...r.kernel.org>,
        Huacai Chen <chenhuacai@...nel.org>,
        Jian-Hong Pan <jhp@...lessos.org>,
        Hui Wang <hui.wang@...onical.com>,
        PeiSen Hou <pshou@...ltek.com>
Subject: Re: [PATCH 1/4] ALSA: hda/realtek: fix mute/micmute LEDs for HP 855 G8

On Sun, 30 Jan 2022 12:10:20 +0100,
Alexander Sergeyev wrote:
> 
> On Sat, Jan 29, 2022 at 05:47:07PM +0300, Alexander Sergeyev wrote:
> > But unbind-bind problems with IO_PAGE_FAULT and "out of range cmd" are not 
> > eliminated. IO_PAGE_FAULT are often logged without accompanying "out of range 
> > cmd". And after adding debugging printk() I haven't managed to trigger "out 
> > of range cmd" yet. But IO_PAGE_FAULT are more easily triggered.
> 
> IO_PAGE_FAULTs go away with CONFIG_IOMMU_DEFAULT_PASSTHROUGH enabled. As I 
> understand, this leads to reduced DMA device isolation which is generally not 
> desirable. I was initially thinking about races between some delayed code and 
> io-memory pages unmapping, but first IO_PAGE_FAULTs (running non-passthrough 
> iommu) happen during bind operations as well.

That's logical, as IOMMU is bypassed for DMA with that option.

I still don't get what really triggers it.  This won't happen when you
build modules and load/unload the driver instead of dynamic binding?

And the out-of-range access is puzzling, too.  I guess this comes from
the update of a COEF, i.e. it reads a strange value and tries to
update the value based on it.  The problem is that it's no -1 but some
random value.  This might be tied with the IOMMU error, and it might
reading unexpected address, which would be really bad.

In anyway, we need to track down exactly which access triggers those
errors...

> What is also interesting, unbind & bind consistently fails on 31th bind:
> 
> echo -n '0000:05:00.6' > /sys/bus/pci/drivers/snd_hda_intel/bind
> -bash: echo: write error: No such device
> 
> And does not recover from there until a reboot.

This is intended behavior.  The driver has a static device index that
is incremented at each probe, so that the driver may probe multiple
instances.  It'll be tricky to reset this for dynamic binding,
though.  This problem is not only for HD-audio but for most of other
drivers.  But I leave this as is for now, since the dynamic binding is
rarely used for PCI and other buses, so far.


Takashi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ