diff options
author | Guenter Roeck <[email protected]> | 2020-01-30 18:11:59 -0800 |
---|---|---|
committer | Borislav Petkov <[email protected]> | 2020-03-19 11:58:13 +0100 |
commit | bac59d18c7018a2fd5e800a1e72a8271bf404977 (patch) | |
tree | 7d047657b3491b41a1049a2aff514c7ef141b369 /tools/perf/scripts/python/export-to-sqlite.py | |
parent | 6f8f0dc980028e98ae339876a8403edae4d20e39 (diff) |
x86/setup: Fix static memory detection
When booting x86 images in qemu, the following warning is seen randomly
if DEBUG_LOCKDEP is enabled.
WARNING: CPU: 0 PID: 1 at kernel/locking/lockdep.c:1119
lockdep_register_key+0xc0/0x100
static_obj() returns true if an address is between _stext and _end.
On x86, this includes the brk memory space. Problem is that this memory
block is not static on x86; its unused portions are released after init
and can be allocated. This results in the observed warning if a lockdep
object is allocated from this memory.
Solve the problem by implementing arch_is_kernel_initmem_freed() for
x86 and have it return true if an address is within the released memory
range.
The same problem was solved for s390 with commit
7a5da02de8d6e ("locking/lockdep: check for freed initmem in static_obj()"),
which introduced arch_is_kernel_initmem_freed().
Signed-off-by: Guenter Roeck <[email protected]>
Signed-off-by: Borislav Petkov <[email protected]>
Acked-by: Peter Zijlstra <[email protected]>
Link: https://lkml.kernel.org/r/[email protected]
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions