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  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 13:20:44 +0200
From:	Arnd Bergmann <>
To:	"Kirill A. Shutemov" <>
Cc:, Avi Kivity <>,
	Brian Gerst <>,
	David Howells <>,
	"H. Peter Anvin" <>, Ingo Molnar <>,
	"Paul E. McKenney" <>,
	Pekka Enberg <>,
	Peter Zijlstra <>,
	Suresh Siddha <>,
	Thomas Gleixner <>,
	Venkatesh Pallipadi <>,
Subject: [PATCH] preempt: fix kernel build with !CONFIG_BKL

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 <>
Reported-by: "Kirill A. Shutemov" <>

> /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

Does this work? Ideally please test with LOCKDEP enabled to see if
there are other problems in this configuration that I missed.

--- 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()
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

Powered by blists - more mailing lists