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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <625BA99ED14B2D499DC4E29D8138F1505C8ED7F99C@shsmsx502.ccr.corp.intel.com>
Date:	Sat, 7 May 2011 05:41:02 +0800
From:	"Tian, Kevin" <kevin.tian@...el.com>
To:	Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>
CC:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"mingo@...hat.com" <mingo@...hat.com>,
	"hpa@...or.com" <hpa@...or.com>,
	"tglx@...utronix.de" <tglx@...utronix.de>,
	Ian Campbell <Ian.Campbell@...citrix.com>,
	"JBeulich@...ell.com" <JBeulich@...ell.com>,
	"xen-devel@...ts.xensource.com" <xen-devel@...ts.xensource.com>
Subject: RE: [PATCH v2 1/2] x86: skip migrating IRQF_PER_CPU irq in
 fixup_irqs

> From: Konrad Rzeszutek Wilk [mailto:konrad.wilk@...cle.com]
> Sent: Friday, May 06, 2011 9:58 PM
> 
> On Fri, May 06, 2011 at 02:43:36PM +0800, Tian, Kevin wrote:
> > x86: skip migrating IRQF_PER_CPU irq in fixup_irqs
> >
> > IRQF_PER_CPU marks a irq binding to a specific cpu, and can never be
> > moved away from that cpu. So it shouldn't be migrated when fixup irqs
> > to offline a cpu. Xen pvops guest is one source using IRQF_PER_CPU
>   ^- are called
> > on a set of virtual interrupts. Previously no error is observed
>                                                       ^^- was
> Which ones? Can you be more specific here of which type of virtual interrupts?
>  spinlock? timer?

all of them: spinlock, timer, resched, callfunc, ...

> > because Xen event chip silently fails the set_affinity ops, and
> > logically IRQF_PER_CPU should be recognized here.
> 
> OK, so what if the set_affinity ops was implemented?

it was implemented: (drivers/xen/event.c, rebind_irq_to_cpu)
        /*
         * If this fails, it usually just indicates that we're dealing with a
         * virq or IPI channel, which don't actually need to be rebound. Ignore
         * it, but don't do the xenlinux-level rebind in that case.
         */
        if (HYPERVISOR_event_channel_op(EVTCHNOP_bind_vcpu, &bind_vcpu) >= 0)
                bind_evtchn_to_cpu(evtchn, tcpu);
Hypervisor doesn't allow to change affinity for virq and ipi.

Thanks,
Kevin

> >
> > Signed-off-by: Fengzhe Zhang <fengzhe.zhang@...el.com>
> > Signed-off-by: Kevin Tian <kevin.tian@...el.com>
> > CC: Thomas Gleixner <tglx@...utronix.de>
> > CC: Ingo Molnar <mingo@...hat.com>
> > CC: H. Peter Anvin <hpa@...or.com>
> > CC: Ian Campbell <Ian.Campbell@...rix.com>
> > CC: Jan Beulich <JBeulich@...ell.com>
> >
> > --- linux-2.6.39-rc6.orig/arch/x86/kernel/irq.c	2011-05-04
> 10:59:13.000000000 +0800
> > +++ linux-2.6.39-rc6/arch/x86/kernel/irq.c	2011-05-06 09:20:25.563963000
> +0800
> > @@ -249,7 +250,7 @@ void fixup_irqs(void)
> >
> >  		data = irq_desc_get_irq_data(desc);
> >  		affinity = data->affinity;
> > -		if (!irq_has_action(irq) ||
> > +		if (!irq_has_action(irq) || irqd_is_per_cpu(data) ||
> >  		    cpumask_subset(affinity, cpu_online_mask)) {
> >  			raw_spin_unlock(&desc->lock);
> >  			continue;
> > --
> > 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/
--
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