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]
Date:	Wed, 19 Jan 2011 14:12:02 +0100
From:	Peter Zijlstra <a.p.zijlstra@...llo.nl>
To:	Pekka Enberg <penberg@...nel.org>
Cc:	Ingo Molnar <mingo@...e.hu>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Tejun Heo <tj@...nel.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	"H. Peter Anvin" <hpa@...or.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Pekka Enberg <penberg@...helsinki.fi>
Subject: Re: percpu related boot crash on x86 (was: Linux 2.6.38-rc1)

On Wed, 2011-01-19 at 14:56 +0200, Pekka Enberg wrote:
> 
> On Wed, Jan 19, 2011 at 2:48 PM, Peter Zijlstra
> <a.p.zijlstra@...llo.nl> wrote:
> >  start_kernel()
> >   local_irq_disable()
> >   ...
> >   early_irq_init()
> >     alloc_desc()
> >       alloc_percpu()
> >         __alloc_percpu()
> >           pcpu_alloc()
> >             pcpu_extend_area_map()
> >               pcpu_mem_free()
> >                 vfree()
> >                   __vunmap()
> >                     remove_vm_area()
> >                       free_unmap_vmap_area()
> >                         vmap_debug_free_range()
> > #ifdef CONFIG_DEBUG_PAGEALLOC
> >                           flush_tlb_kernel_range()
> >                             flush_tlb_all()
> >                               on_each_cpu()
> >                                 smp_call_function()
> >                                   WARN_ON_ONCE(irqs_disabled()....);
> >
> >
> > Not quite sure that to do about that though..
> 
> Is vmalloc() and vfree() supposed to work with interrupts disabled? 

I'm not sure about vmalloc(), but vfree() has been known to not work
with IRQs disabled for a long long while.

Looking at the code neither can work, since vmalloc() can end up calling
vfree(), what's curious though is that all the BUG_ON()s in there are on
in_interrupt() instead of for irqs_disabled().

> I always thought they weren't which would mean something in
> pcpu_mem_alloc() needs changing... 

Is alloc_percpu() supposed to work from atomic context?
--
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