Skip to content

Commit e638072

Browse files
Carlos Llamasfbq
authored andcommitted
lockdep: Fix upper limit for LOCKDEP_*_BITS configs
Lockdep has a set of configs used to determine the size of the static arrays that it uses. However, the upper limit that was initially setup for these configs is too high (30 bit shift). This equates to several GiB of static memory for individual symbols. Using such high values leads to linker errors: $ make defconfig $ ./scripts/config -e PROVE_LOCKING --set-val LOCKDEP_BITS 30 $ make olddefconfig all [...] ld: kernel image bigger than KERNEL_IMAGE_SIZE ld: section .bss VMA wraps around address space Adjust the upper limits to the maximum values that avoid these issues. The need for anything more, likely points to a problem elsewhere. Note that LOCKDEP_CHAINS_BITS was intentionally left out as its upper limit had a different symptom and has already been fixed [1]. Reported-by: J. R. Okajima <[email protected]> Closes: https://lore.kernel.org/all/30795.1620913191@jrobl/ [1] Cc: Peter Zijlstra <[email protected]> Cc: Boqun Feng <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Waiman Long <[email protected]> Cc: Will Deacon <[email protected]> Acked-by: Waiman Long <[email protected]> Signed-off-by: Carlos Llamas <[email protected]> Signed-off-by: Boqun Feng <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 0d3547d commit e638072

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/Kconfig.debug

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1504,7 +1504,7 @@ config LOCKDEP_SMALL
15041504
config LOCKDEP_BITS
15051505
int "Bitsize for MAX_LOCKDEP_ENTRIES"
15061506
depends on LOCKDEP && !LOCKDEP_SMALL
1507-
range 10 30
1507+
range 10 24
15081508
default 15
15091509
help
15101510
Try increasing this value if you hit "BUG: MAX_LOCKDEP_ENTRIES too low!" message.
@@ -1520,23 +1520,23 @@ config LOCKDEP_CHAINS_BITS
15201520
config LOCKDEP_STACK_TRACE_BITS
15211521
int "Bitsize for MAX_STACK_TRACE_ENTRIES"
15221522
depends on LOCKDEP && !LOCKDEP_SMALL
1523-
range 10 30
1523+
range 10 26
15241524
default 19
15251525
help
15261526
Try increasing this value if you hit "BUG: MAX_STACK_TRACE_ENTRIES too low!" message.
15271527

15281528
config LOCKDEP_STACK_TRACE_HASH_BITS
15291529
int "Bitsize for STACK_TRACE_HASH_SIZE"
15301530
depends on LOCKDEP && !LOCKDEP_SMALL
1531-
range 10 30
1531+
range 10 26
15321532
default 14
15331533
help
15341534
Try increasing this value if you need large STACK_TRACE_HASH_SIZE.
15351535

15361536
config LOCKDEP_CIRCULAR_QUEUE_BITS
15371537
int "Bitsize for elements in circular_queue struct"
15381538
depends on LOCKDEP
1539-
range 10 30
1539+
range 10 26
15401540
default 12
15411541
help
15421542
Try increasing this value if you hit "lockdep bfs error:-1" warning due to __cq_enqueue() failure.

0 commit comments

Comments
 (0)