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: <20110805001507.GA5987@local>
Date:	Fri, 5 Aug 2011 02:15:07 +0200
From:	"Hans J. Koch" <hjk@...sjkoch.de>
To:	"Michael S. Tsirkin" <mst@...hat.com>
Cc:	Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
	Chris Wright <chrisw@...hat.com>,
	"Hans J. Koch" <hjk@...sjkoch.de>,
	Jesse Barnes <jbarnes@...tuousgeek.org>,
	Greg Kroah-Hartman <gregkh@...e.de>,
	Anthony Foiani <anthony.foiani@...il.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] uio/gen-pci: don't enable interrupts in ISR

On Fri, Aug 05, 2011 at 12:04:13AM +0300, Michael S. Tsirkin wrote:
> On Thu, Aug 04, 2011 at 10:46:06PM +0200, Sebastian Andrzej Siewior wrote:
> > As reported by Anthony in a short way:
> > 
> > |irq 17 handler uio_interrupt+0x0/0x68 enabled interrupts
> > |NIP [c0069d84] handle_irq_event_percpu+0x260/0x26c
> > 
> > The problem here is that spin_unlock_irq() enables the interrupts which
> > is a no-no in interrupt context because they always run with interrupts
> > disabled. This is the case even if IRQF_DISABLED has not been specified
> > since v2.6.35. Therefore this patch uses simple spin_locks().
> > 
> > Looking at it further here is only one spot where the lock is hold. So
> > giving the fact that an ISR is not reentrant and is not executed on two
> > cpus at the same time why do we need a lock here?
> 
> I'm not sure anymore. I think the idea was to use
> it for synchronization down the road somehow,
> but it never materialized. Let's drop that lock completely.

That sounds reasonable.

> 
> > The driver lacks of ->irqcontrol function so I guess the interrupt is
> > enabled via direct PCI-access in userland.
> 
> Through sysfs.

How? With /sys/devices/pci.../enable ?

Thanks,
Hans
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ