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] [day] [month] [year] [list]
Message-ID: <20170426143920.GA27155@potion>
Date:   Wed, 26 Apr 2017 16:39:20 +0200
From:   Radim Krčmář <rkrcmar@...hat.com>
To:     Paolo Bonzini <pbonzini@...hat.com>
Cc:     Jan Kara <jack@...e.cz>,
        "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
        Ross Zwisler <ross.zwisler@...ux.intel.com>,
        linux-ext4@...r.kernel.org, Theodore Ts'o <tytso@....edu>,
        linux-kernel@...r.kernel.org,
        Josh Triplett <josh@...htriplett.org>, kvm@...r.kernel.org
Subject: Re: kernel/rcu/tree.c:1031 rcu_irq_enter() invoked with irqs
 enabled!!!!

2017-04-26 16:29+0200, Paolo Bonzini:
> On 26/04/2017 16:18, Radim Krčmář wrote:
>>> OK, but looking at the stack trace, this has nothing to do with ext4. The
>>> problem seems to be in KVM - relevant CCs added.
>> The path begins with async_page_fault interrupt gate and the hardware
>> should clear the interrupt flag before executing it.  I don't see a
>> change that would break the assumption that interrupts are disabled ...
> 
> native_safe_halt enables interrupts.  I think this is it:
> 
> diff --git a/arch/x86/kernel/kvm.c b/arch/x86/kernel/kvm.c
> index 14f65a5f938e..2a7835932b71 100644
> --- a/arch/x86/kernel/kvm.c
> +++ b/arch/x86/kernel/kvm.c
> @@ -161,8 +161,8 @@ void kvm_async_pf_task_wait(u32 token)
>  			 */
>  			rcu_irq_exit();
>  			native_safe_halt();
> -			rcu_irq_enter();
>  			local_irq_disable();
> +			rcu_irq_enter();
>  		}
>  	}
>  	if (!n.halted)

We called rcu_irq_enter() there twice, *facepalm*.
Yes, that patch should fix it.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ