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: <ZrYJPdW0-MQMejP3@smile.fi.intel.com>
Date: Fri, 9 Aug 2024 15:19:09 +0300
From: Andy Shevchenko <andriy.shevchenko@...el.com>
To: Breno Leitao <leitao@...ian.org>
Cc: ldewangan@...dia.com, Dmitry Osipenko <digetx@...il.com>,
	Andi Shyti <andi.shyti@...nel.org>,
	Thierry Reding <thierry.reding@...il.com>,
	Jonathan Hunter <jonathanh@...dia.com>, paulmck@...nel.org,
	apopple@...dia.com, Michael van der Westhuizen <rmikey@...a.com>,
	"open list:I2C SUBSYSTEM HOST DRIVERS" <linux-i2c@...r.kernel.org>,
	"open list:TEGRA ARCHITECTURE SUPPORT" <linux-tegra@...r.kernel.org>,
	open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] [i2c-tegra] Do not mark ACPI devices as irq safe

On Wed, Jun 12, 2024 at 05:12:43AM -0700, Breno Leitao wrote:
> On Tue, Jun 11, 2024 at 03:49:02PM +0300, Andy Shevchenko wrote:
> > On Thu, Jun 06, 2024 at 06:27:07AM -0700, Breno Leitao wrote:
> 
> > > The problem arises because during __pm_runtime_resume(), the spinlock
> > > &dev->power.lock is acquired before rpm_resume() is called. Later,
> > > rpm_resume() invokes acpi_subsys_runtime_resume(), which relies on
> > > mutexes, triggering the error.
> > > 
> > > To address this issue, devices on ACPI are now marked as not IRQ-safe,
> > > considering the dependency of acpi_subsys_runtime_resume() on mutexes.
> > 
> > ...
> > 
> > While it's a move in the right direction, the real fix is to get rid of
> > the IRQ safe PM hack completely.
> > Look at how OMAP code was modified for
> > the last few years and now it's pm_runtime_irq_safe()-free. The main
> > (ab)users are SH code followed by Tegra drivers.
> 
> Thanks. 
> 
> I think these are two different goals here. This near term goal is just
> fix the driver so it can use the pm_runtime_irq_safe() in a saner
> way, avoiding calling mutexes inside spinlocks.
> 
> Getting rid of the IRQ safe PM seems to me to be more a long term
> desirable goal, and unfortunately I cannot afford doing it now.
> 
> Laxman, what is your view on this topic?

Yes, please, comment on this. We would like to get rid of the hack named "IRQ
safe PM runtime".

-- 
With Best Regards,
Andy Shevchenko



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ