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: <4D0B1CD9.5060601@web.de>
Date:	Fri, 17 Dec 2010 09:18:33 +0100
From:	Jan Kiszka <jan.kiszka@....de>
To:	Thomas Gleixner <tglx@...utronix.de>
CC:	Avi Kivity <avi@...hat.com>, Marcelo Tosatti <mtosatti@...hat.com>,
	linux-kernel@...r.kernel.org, kvm <kvm@...r.kernel.org>,
	Tom Lyon <pugs@...co.com>,
	Alex Williamson <alex.williamson@...hat.com>,
	"Michael S. Tsirkin" <mst@...hat.com>,
	Jan Kiszka <jan.kiszka@...mens.com>
Subject: Re: [PATCH v3 2/4] genirq: Inform handler about line sharing state

Am 16.12.2010 21:26, Jan Kiszka wrote:
> Am 16.12.2010 14:13, Thomas Gleixner wrote:
>> On Mon, 13 Dec 2010, Jan Kiszka wrote:
>>> +	if (old_action && (old_action->flags & IRQF_ADAPTIVE) &&
>>> +	    !(desc->irq_data.drv_status & IRQS_SHARED)) {
>>> +		/*
>>> +		 * Signal the old handler that is has to switch to shareable
>>> +		 * handling mode. Disable the line to avoid any conflict with
>>> +		 * a real IRQ.
>>> +		 */
>>> +		disable_irq(irq);
>>
>> This is weird, really. I thought you wanted to avoid waiting for the
>> threaded handler to finish if it's on the fly. So this should be
>> disable_irq_nosync() or did you change your mind ?
> 
> No, I did not. I wanted to avoid that we set MAKE_SHAREABLE while there
> might be another IRQ in flight. The handler that is called due to a real
> IRQ might misinterpret MAKE_SHAREABLE as "there is no real event" and
> perform the wrong steps (at least the current implementation for KVM would).

Actually, the requirement we have to fulfill here is to avoid that the
hardirq handler sees !SHARED while the threaded one reads "SHARED". To
achieve this without disabling the line, I'm still searching for a way
to couple the sharing state of associated hard and threaded handler runs
- but I think there is no reliable association, is there?

Jan


Download attachment "signature.asc" of type "application/pgp-signature" (260 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ