Re: linux/master crashes on boot with KASAN=y

From: Jakub Kicinski
Date: Sat Dec 23 2017 - 03:20:05 EST


On Sat, 23 Dec 2017 00:01:43 -0800, Jakub Kicinski wrote:
> commit 21506525fb8ddb0342f2a2370812d47f6a1f3833 (HEAD, refs/bisect/bad)
> Author: Andy Lutomirski <luto@xxxxxxxxxx>
> Date: Mon Dec 4 15:07:16 2017 +0100
>
> x86/kasan/64: Teach KASAN about the cpu_entry_area
>
> The cpu_entry_area will contain stacks. Make sure that KASAN has
> appropriate shadow mappings for them.

> [ 22.562224] BUG: unable to handle kernel paging request at fffffbffffe8ee04
> [ 22.562234] IP: check_memory_region+0x5c/0x190
> [ 22.562235] PGD 87ffd9067 P4D 87ffd9067 PUD 87ffd8067 PMD 87ffd7067 PTE 0

Reverting this doesn't get me far, though. Boot stops after:

[ 0.216037] Performance Events: PEBS fmt2+, Broadwell events, 16-deep LBR, full-width counters, Intel PMU driver.
[ 0.220029] ... version: 3
[ 0.224007] ... bit width: 48
[ 0.228002] ... generic registers: 8
[ 0.232002] ... value mask: 0000ffffffffffff
[ 0.236002] ... max period: 00007fffffffffff
[ 0.240002] ... fixed-purpose events: 3
[ 0.244002] ... event mask: 00000007000000ff
[ 0.256006] Hierarchical SRCU implementation.
[ 0.277436] NMI watchdog: Enabled. Permanently consumes one hw-PMU counter.
[ 0.288005] smp: Bringing up secondary CPUs ...
[ 0.324086] x86: Booting SMP configuration:
[ 0.328009] .... node #1, CPUs: #1
[ 0.448004] .... node #0, CPUs: #2
[ 0.484005] .... node #1, CPUs: #3
[ 0.520004] .... node #0, CPUs: #4
[ 0.556005] .... node #1, CPUs: #5
[ 0.592004] .... node #0, CPUs: #6
[ 0.628005] .... node #1, CPUs: #7
[ 0.664004] .... node #0, CPUs: #8
[ 0.700006] .... node #1, CPUs: #9
[ 0.736004] .... node #0, CPUs: #10
[ 0.772006] .... node #1, CPUs: #11
[ 0.808004] .... node #0, CPUs: #12
[ 0.844005] .... node #1, CPUs: #13
[ 0.880004] .... node #0, CPUs: #14
[ 0.916005] .... node #1, CPUs: #15
[ 0.952004] .... node #0, CPUs: #16
[ 0.988006] .... node #1, CPUs: #17
[ 1.024004] .... node #0, CPUs: #18

Without producing any splat.