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] [day] [month] [year] [list]
Message-ID: <20150422135242.GG3671@charon>
Date:	Wed, 22 Apr 2015 14:52:42 +0100
From:	Luis Henriques <luis.henriques@...onical.com>
To:	Paolo Bonzini <pbonzini@...hat.com>
Cc:	linux-kernel@...r.kernel.org, kvm@...r.kernel.org,
	saso.linux@...im.si, lists2009@...rfbargle.com,
	Nadav Amit <namit@...technion.ac.il>, stable@...r.kernel.org
Subject: Re: [PATCH stable] KVM: x86: Fix lost interrupt on irr_pending race

On Wed, Apr 22, 2015 at 03:47:04PM +0200, Paolo Bonzini wrote:
> 
> 
> On 22/04/2015 15:34, Luis Henriques wrote:
> > Thanks Paolo.  I was going to apply this backport to the 3.16 kernel
> > but it looks like the original commit is a clean cherry-pick.  Shall I
> > still apply your backport, or do you think the original commit should
> > be applied instead?
> 
> Indeed you're right.  I wrote the backport for 3.16(.0).  However,
> commit 56cc2406d68c0f09505c389e276f27a99f495cbd was marked for stable,
> so it's necessary to cherry-pick the entire patch on the stable kernel
> where the buggy commit was backported.
> 
> That should be, according to the stable@...r.kernel.org archives,
> 3.10.54+, 3.13.11.7+, 3.14.18+, 3.16.2+.
> 

Great, thanks for the quick reply.  I'll queue the (entire) fix for
the 3.16 kernel.

Cheers,
--
Luís

> Paolo
> 
> > Cheers,
> > --
> > Luís
> > 
> >> diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c
> >> index 6e8ce5a1a05d..e0e5642dae41 100644
> >> --- a/arch/x86/kvm/lapic.c
> >> +++ b/arch/x86/kvm/lapic.c
> >> @@ -341,8 +341,12 @@ EXPORT_SYMBOL_GPL(kvm_apic_update_irr);
> >>  
> >>  static inline void apic_set_irr(int vec, struct kvm_lapic *apic)
> >>  {
> >> -	apic->irr_pending = true;
> >>  	apic_set_vector(vec, apic->regs + APIC_IRR);
> >> +	/*
> >> +	 * irr_pending must be true if any interrupt is pending; set it after
> >> +	 * APIC_IRR to avoid race with apic_clear_irr
> >> +	 */
> >> +	apic->irr_pending = true;
> >>  }
> >>  
> >>  static inline int apic_search_irr(struct kvm_lapic *apic)
> >>
> >>
> >> Thanks,
> >>
> >> Paolo
> >> --
> >> To unsubscribe from this list: send the line "unsubscribe stable" in
> >> the body of a message to majordomo@...r.kernel.org
> >> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> --
> To unsubscribe from this list: send the line "unsubscribe stable" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
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