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] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 28 Oct 2010 16:46:58 +0300
From:	"Kirill A. Shutemov" <kirill@...temov.name>
To:	Arnd Bergmann <arnd@...db.de>
Cc:	linux-kernel@...r.kernel.org, Avi Kivity <avi@...hat.com>,
	Brian Gerst <brgerst@...il.com>,
	David Howells <dhowells@...hat.com>,
	"H. Peter Anvin" <hpa@...or.com>, Ingo Molnar <mingo@...hat.com>,
	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
	Pekka Enberg <penberg@...nel.org>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Suresh Siddha <suresh.b.siddha@...el.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Venkatesh Pallipadi <venki@...gle.com>, x86@...nel.org
Subject: Re: [PATCH] preempt: fix kernel build with !CONFIG_BKL

On Thu, Oct 28, 2010 at 01:20:44PM +0200, Arnd Bergmann wrote:
> The preempt count logic tries to take the BKL into account, which breaks
> when CONFIG_BKL is not set.
> 
> Use the same preempt_count offset that we use without CONFIG_PREEMPT
> when CONFIG_BKL is disabled.
> 
> Signed-off-by: Arnd Bergmann <arnd@...db.de>
> Reported-by: "Kirill A. Shutemov" <kirill@...temov.name>

Remove quotes, please.

> 
> ---
> > /home/kas/git/tmp/linux-2.6-local/arch/x86/include/asm/i387.h: In function ‘irq_ts_save’:
> > /home/kas/git/tmp/linux-2.6-local/arch/x86/include/asm/i387.h:324: error: implicit declaration of function ‘kernel_locked’
> > make[1]: *** [arch/x86/kernel/asm-offsets.s] Error 1
> > make: *** [prepare0] Error 2
> 
> Ah, found it. I had not considered or tested the case of CONFIG_BKL=n
> with CONFIG_PREEMPT=y.
> 
> Does this work? Ideally please test with LOCKDEP enabled to see if
> there are other problems in this configuration that I missed.

I've got a lot of __schedule_bug. Log attached.

Also reproducible with QEMU.

> --- a/include/linux/hardirq.h
> +++ b/include/linux/hardirq.h
> @@ -96,7 +96,7 @@
>   */
>  #define in_nmi()	(preempt_count() & NMI_MASK)
>  
> -#if defined(CONFIG_PREEMPT)
> +#if defined(CONFIG_PREEMPT) && defined(CONFIG_BKL)
>  # define PREEMPT_INATOMIC_BASE kernel_locked()
>  # define PREEMPT_CHECK_OFFSET 1
>  #else

-- 
 Kirill A. Shutemov

View attachment "log" of type "text/plain" (267503 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ