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: <20121127174737.GN12969@redhat.com>
Date:	Tue, 27 Nov 2012 19:47:37 +0200
From:	Gleb Natapov <gleb@...hat.com>
To:	Frederic Weisbecker <fweisbec@...il.com>
Cc:	Li Zhong <zhong@...ux.vnet.ibm.com>,
	linux-next list <linux-next@...r.kernel.org>,
	LKML <linux-kernel@...r.kernel.org>, paulmck@...ux.vnet.ibm.com,
	sasha.levin@...cle.com, avi@...hat.com
Subject: Re: [RFC PATCH] Fix abnormal rcu dynticks_nesting values related to
 async page fault

On Tue, Nov 27, 2012 at 06:30:32PM +0100, Frederic Weisbecker wrote:
> 2012/11/27 Gleb Natapov <gleb@...hat.com>:
> > diff --git a/arch/x86/kernel/kvm.c b/arch/x86/kernel/kvm.c
> > index 4180a87..636800d 100644
> > --- a/arch/x86/kernel/kvm.c
> > +++ b/arch/x86/kernel/kvm.c
> > @@ -113,7 +113,7 @@ void kvm_async_pf_task_wait(u32 token)
> >         int cpu, idle;
> >
> >         cpu = get_cpu();
> > -       idle = idle_cpu(cpu);
> > +       idle = is_idle_task(current);
> 
> I suggest this part goes to a standalone patch.
> 
> >         put_cpu();
> >
> >         spin_lock(&b->lock);
> > @@ -247,10 +247,7 @@ do_async_page_fault(struct pt_regs *regs, unsigned long error_code)
> >                 break;
> >         case KVM_PV_REASON_PAGE_NOT_PRESENT:
> >                 /* page is swapped out by the host. */
> > -               rcu_irq_enter();
> > -               exit_idle();
> >                 kvm_async_pf_task_wait((u32)read_cr2());
> > -               rcu_irq_exit();
> 
> Hmm, we still need those above around. I believe we just need to add
> rcu_user_exit() in the beginning of that case.
The exception may happen in kernel space too. Is calling rcu_user_exit()
still OK? Also why calling exit_idle() if we are not exiting idle?

--
			Gleb.
--
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