linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* CONFIG_UBSAN_ALIGNMENT breaks x86-64 kernel with lockdep enabled
@ 2016-01-30  0:36 Mike Krinkin
  2016-02-01 15:10 ` Andrey Ryabinin
  0 siblings, 1 reply; 5+ messages in thread
From: Mike Krinkin @ 2016-01-30  0:36 UTC (permalink / raw)
  To: aryabinin; +Cc: akpm, linux-kernel

Hi,

option CONFIG_UBSAN_ALIGNMENT breaks x86-64 kernel with lockdep enabled,
i. e kernel with CONFIG_UBSAN_ALIGNMENT fails to load without even any
error message.

The problem is that ubsan callbacks use spinlocks and might be called
before lockdep is initialized. Particularly this line in the
reserve_ebda_region function causes problem:

lowmem = *(unsigned short *)__va(BIOS_LOWMEM_KILOBYTES);

If i put lockdep_init() before reserve_ebda_region call in
x86_64_start_reservations kernel loads well. Since CONFIG_UBSAN_ALIGNMENT
isn't useful for x86 anyway it might be better to disable this option for
x86 arch?

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-02-02 21:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-30  0:36 CONFIG_UBSAN_ALIGNMENT breaks x86-64 kernel with lockdep enabled Mike Krinkin
2016-02-01 15:10 ` Andrey Ryabinin
2016-02-01 22:21   ` Andrew Morton
2016-02-02 16:18     ` Andrey Ryabinin
2016-02-02 21:18       ` Andrew Morton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).