Hello,
syzbot tried to test the proposed patch but build failed:
failed to create VM: can't ssh into the instance
Pseudo-terminal will not be allocated because stdin is not a terminal.
Warning: Permanently
added '[
ssh-serialport.googleapis.com]:9600,[216.239.38.127]:9600' (RSA) to
the list of known hosts.
serialport: Connected to
syzkaller.us-central1-c.ci-upstream-next-kasan-gce-job-0 port 1 (session
ID: 8d2605f9e70847528bf9424e70c90a422ce57c0a5bbb0b7cc03b210830e27cfb,
active connections: 1).
SeaBIOS (version 1.8.2-20171012_061934-google)
Total RAM Size = 0x00000001e0000000 = 7680 MiB
Failed to get pci whitelist data
CPUs found: 2 Max CPUs supported: 2
found virtio-scsi at 0:3
virtio-scsi vendor='Google' product='PersistentDisk' rev='1' type=0
removable=0
virtio-scsi blksize=512 sectors=4194304 = 2048 MiB
drive 0x000f3030: PCHS=0/0/0 translation=lba LCHS=520/128/63 s=4194304
Booting from Hard Disk 0...
early console in extract_kernel
input_data: 0x0000000005f46276
input_len: 0x0000000001e0998d
output: 0x0000000001000000
output_len: 0x0000000005c46958
kernel_total_size: 0x0000000006d6f000
Decompressing Linux... Parsing ELF... done.
Booting the kernel.
[ 0.000000] Linux version 4.14.0-next-20171122+ (syzkaller@ci) (gcc
version 7.1.1 20170620 (GCC)) #18 SMP Wed Nov 22 17:18:20 UTC 2017
[ 0.000000] Command line: BOOT_IMAGE=/vmlinuz root=/dev/sda1
console=ttyS0 earlyprintk=serial vsyscall=native rodata=n
ftrace_dump_on_oops=orig_cpu oops=panic panic_on_warn=1 nmi_watchdog=panic
panic=86400 kvm-intel.nested=1
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x001: 'x87 floating point
registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x002: 'SSE registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x004: 'AVX registers'
[ 0.000000] x86/fpu: xstate_offset[2]: 576, xstate_sizes[2]: 256
[ 0.000000] x86/fpu: Enabled xstate features 0x7, context size is 832
bytes, using 'standard' format.
[ 0.000000] e820: BIOS-provided physical RAM map:
[ 0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009fbff] usable
[ 0.000000] BIOS-e820: [mem 0x000000000009fc00-0x000000000009ffff]
reserved
[ 0.000000] BIOS-e820: [mem 0x00000000000f0000-0x00000000000fffff]
reserved
[ 0.000000] BIOS-e820: [mem 0x0000000000100000-0x00000000bfffcfff] usable
[ 0.000000] BIOS-e820: [mem 0x00000000bfffd000-0x00000000bfffffff]
reserved
[ 0.000000] BIOS-e820: [mem 0x00000000fffbc000-0x00000000ffffffff]
reserved
[ 0.000000] BIOS-e820: [mem 0x0000000100000000-0x000000021fffffff] usable
[ 0.000000] bootconsole [earlyser0] enabled
[ 0.000000] NX (Execute Disable) protection: active
[ 0.000000] random: fast init done
[ 0.000000] SMBIOS 2.4 present.
[ 0.000000] DMI: Google Google Compute Engine/Google Compute Engine,
BIOS Google 01/01/2011
[ 0.000000] Hypervisor detected: KVM
[ 0.000000] e820: last_pfn = 0x220000 max_arch_pfn = 0x400000000
[ 0.000000] x86/PAT: Configuration [0-7]: WB WC UC- UC WB WP UC- WT
[ 0.000000] e820: last_pfn = 0xbfffd max_arch_pfn = 0x400000000
[ 0.000000] found SMP MP-table at [mem 0x000f32a0-0x000f32af] mapped at
[ffffffffff2002a0]
[ 0.000000] Scanning 1 areas for low memory corruption
[ 0.000000] Using GB pages for direct mapping
[ 0.000000] ACPI: Early table checksum verification disabled
[ 0.000000] ACPI: RSDP 0x00000000000F3070 000014 (v00 Google)
[ 0.000000] ACPI: RSDT 0x00000000BFFFDC70 000034 (v01 Google GOOGRSDT
00000001 GOOG 00000001)
[ 0.000000] ACPI: FACP 0x00000000BFFFFF00 0000F4 (v02 Google GOOGFACP
00000001 GOOG 00000001)
[ 0.000000] ACPI: DSDT 0x00000000BFFFDCB0 0017B2 (v01 Google GOOGDSDT
00000001 GOOG 00000001)
[ 0.000000] ACPI: FACS 0x00000000BFFFFEC0 000040
[ 0.000000] ACPI: FACS 0x00000000BFFFFEC0 000040
[ 0.000000] ACPI: SSDT 0x00000000BFFFF590 000930 (v01 Google GOOGSSDT
00000001 GOOG 00000001)
[ 0.000000] ACPI: APIC 0x00000000BFFFF4A0 000076 (v01 Google GOOGAPIC
00000001 GOOG 00000001)
[ 0.000000] ACPI: WAET 0x00000000BFFFF470 000028 (v01 Google GOOGWAET
00000001 GOOG 00000001)
[ 0.000000] No NUMA configuration found
[ 0.000000] Faking a node at [mem 0x0000000000000000-0x000000021fffffff]
[ 0.000000] NODE_DATA(0) allocated [mem 0x21fffa000-0x21fffdfff]
[ 0.000000] kvm-clock: cpu 0, msr 2:1fff8001, primary cpu clock
[ 0.000000] kvm-clock: Using msrs 4b564d01 and 4b564d00
[ 0.000000] kvm-clock: using sched offset of
2196521286 cycles
[ 0.000000] clocksource: kvm-clock: mask: 0xffffffffffffffff max_cycles:
0x1cd42e4dffb, max_idle_ns: 881590591483 ns
[ 0.000000] Zone ranges:
[ 0.000000] DMA [mem 0x0000000000001000-0x0000000000ffffff]
[ 0.000000] DMA32 [mem 0x0000000001000000-0x00000000ffffffff]
[ 0.000000] Normal [mem 0x0000000100000000-0x000000021fffffff]
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000000001000-0x000000000009efff]
[ 0.000000] node 0: [mem 0x0000000000100000-0x00000000bfffcfff]
[ 0.000000] node 0: [mem 0x0000000100000000-0x000000021fffffff]
[ 0.000000] Initmem setup node 0 [mem
0x0000000000001000-0x000000021fffffff]
[ 0.000000] Reserved but unavailable: 98 pages
[ 0.000000] kasan: KernelAddressSanitizer initialized
[ 0.000000] ACPI: PM-Timer IO Port: 0xb008
[ 0.000000] ACPI: LAPIC_NMI (acpi_id[0xff] dfl dfl lint[0x1])
[ 0.000000] IOAPIC[0]: apic_id 0, version 17, address 0xfec00000, GSI
0-23
[ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 5 global_irq 5 high level)
[ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level)
[ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 10 global_irq 10 high level)
[ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 11 global_irq 11 high level)
[ 0.000000] Using ACPI (MADT) for SMP configuration information
[ 0.000000] smpboot: Allowing 2 CPUs, 0 hotplug CPUs
[ 0.000000] PM: Registered nosave memory: [mem 0x00000000-0x00000fff]
[ 0.000000] PM: Registered nosave memory: [mem 0x0009f000-0x0009ffff]
[ 0.000000] PM: Registered nosave memory: [mem 0x000a0000-0x000effff]
[ 0.000000] PM: Registered nosave memory: [mem 0x000f0000-0x000fffff]
[ 0.000000] PM: Registered nosave memory: [mem 0xbfffd000-0xbfffffff]
[ 0.000000] PM: Registered nosave memory: [mem 0xc0000000-0xfffbbfff]
[ 0.000000] PM: Registered nosave memory: [mem 0xfffbc000-0xffffffff]
[ 0.000000] e820: [mem 0xc0000000-0xfffbbfff] available for PCI devices
[ 0.000000] Booting paravirtualized kernel on KVM
[ 0.000000] clocksource: refined-jiffies: mask: 0xffffffff max_cycles:
0xffffffff, max_idle_ns: 1910969940391419 ns
[ 0.000000] setup_percpu: NR_CPUS:64 nr_cpumask_bits:64 nr_cpu_ids:2
nr_node_ids:1
[ 0.000000] percpu: Embedded 49 pages/cpu @ffff8801db400000 s159760
r8192 d32752 u1048576
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages:
1935238
[ 0.000000] Policy zone: Normal
[ 0.000000] Kernel command line: BOOT_IMAGE=/vmlinuz root=/dev/sda1
console=ttyS0 earlyprintk=serial vsyscall=native rodata=n
ftrace_dump_on_oops=orig_cpu oops=panic panic_on_warn=1 nmi_watchdog=panic
panic=86400 kvm-intel.nested=1
[ 0.000000] Memory: 6565408K/7863916K available (66217K kernel code,
7950K rwdata, 10424K rodata, 2316K init, 21516K bss, 1298508K reserved, 0K
cma-reserved)
[ 0.001000] Running RCU self tests
[ 0.001000] Hierarchical RCU implementation.
[ 0.001000] RCU lockdep checking is enabled.
[ 0.001000] RCU restricting CPUs from NR_CPUS=64 to nr_cpu_ids=2.
[ 0.001000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
[ 0.001000] NR_IRQS: 4352, nr_irqs: 440, preallocated irqs: 16
[ 0.001000] Console: colour VGA+ 80x25
[ 0.001000] console [ttyS0] enabled
[ 0.001000] console [ttyS0] enabled
[ 0.001000] bootconsole [earlyser0] disabled
[ 0.001000] bootconsole [earlyser0] disabled
[ 0.001000] Lock dependency validator: Copyright (c) 2006 Red Hat, Inc.,
Ingo Molnar
[ 0.001000] ... MAX_LOCKDEP_SUBCLASSES: 8
[ 0.001000] ... MAX_LOCK_DEPTH: 48
[ 0.001000] ... MAX_LOCKDEP_KEYS: 8191
[ 0.001000] ... CLASSHASH_SIZE: 4096
[ 0.001000] ... MAX_LOCKDEP_ENTRIES: 32768
[ 0.001000] ... MAX_LOCKDEP_CHAINS: 65536
[ 0.001000] ... CHAINHASH_SIZE: 32768
[ 0.001000] memory used by lock dependency info: 7391 kB
[ 0.001000] per task-struct memory footprint: 2304 bytes
[ 0.001000] ACPI: Core revision 20170831
[ 0.001000] ACPI: 2 ACPI AML tables successfully acquired and loaded
[ 0.001000] APIC: Switch to symmetric I/O mode setup
[ 0.001194] x2apic enabled
[ 0.002010] Switched APIC routing to physical x2apic.
[ 0.006000] ..TIMER: vector=0x30 apic1=0 pin1=0 apic2=-1 pin2=-1
[ 0.006000] tsc: Detected 2300.000 MHz processor
[ 0.006000] Calibrating delay loop (skipped) preset value.. 4600.00
BogoMIPS (lpj=2300000)
[ 0.006008] pid_max: default: 32768 minimum: 301
[ 0.008229] Security Framework initialized
[ 0.008904] SELinux: Initializing.
[ 0.017116] Dentry cache hash table entries: 1048576 (order: 11, 8388608
bytes)
[ 0.020229] Inode-cache hash table entries: 524288 (order: 10, 4194304
bytes)
[ 0.021230] Mount-cache hash table entries: 16384 (order: 5, 131072
bytes)
[ 0.022117] Mountpoint-cache hash table entries: 16384 (order: 5, 131072
bytes)
[ 0.025351] CPU: Physical Processor ID: 0
[ 0.025934] CPU: Processor Core ID: 0
[ 0.026059] mce: CPU supports 32 MCE banks
[ 0.027147] Last level iTLB entries: 4KB 1024, 2MB 1024, 4MB 1024
[ 0.028007] Last level dTLB entries: 4KB 1024, 2MB 1024, 4MB 1024, 1GB 4
[ 0.029470] Freeing SMP alternatives memory: 40K
[ 0.031204] ------------[ cut here ]------------
[ 0.031840] kernel BUG at init/main.c:709!
[ 0.032009] invalid opcode: 0000 [#1] SMP KASAN
[ 0.032640] Dumping ftrace buffer:
[ 0.033000] (ftrace buffer empty)
[ 0.033000] Modules linked in:
[ 0.033000] CPU: 0 PID: 0 Comm: swapper/0 Not tainted
4.14.0-next-20171122+ #18
[ 0.033000] Hardware name: Google Google Compute Engine/Google Compute
Engine, BIOS Google 01/01/2011
[ 0.033000] task: ffffffff85e2ec40 task.stack: ffffffff85e00000
[ 0.033000] RIP: 0010:start_kernel+0x71d/0x71f
[ 0.033000] RSP: 0000:ffffffff85e07ea8 EFLAGS: 00010293
[ 0.033000] RAX: ffffffff85e2ec40 RBX: 1ffffffff0cb76aa RCX:
ffffffff86621ae9
[ 0.033000] RDX: 0000000000000000 RSI: 0000000000000000 RDI:
1ffffffff0cb6b01
[ 0.033000] RBP: ffffffff85e07f20 R08: fffffbfff0a0ebcf R09:
0000000000000000
[ 0.033000] R10: 0000000000000000 R11: 0000000000000000 R12:
ffffffff86851340
[ 0.033000] R13: ffff88021fe20840 R14: 0000000000000000 R15:
0000000000000000
[ 0.033000] FS: 0000000000000000(0000) GS:ffff8801db400000(0000)
knlGS:0000000000000000
[ 0.033000] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 0.033000] CR2: ffff88021ffff000 CR3: 0000000005e25000 CR4:
00000000001406f0
[ 0.033000] DR0: 0000000000000000 DR1: 0000000000000000 DR2:
0000000000000000
[ 0.033000] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7:
0000000000000400
[ 0.033000] Call Trace:
[ 0.033000] ? mem_encrypt_init+0xb/0xb
[ 0.033000] ? x86_family+0x32/0x40
[ 0.033000] ? load_ucode_bsp+0x1ea/0x1f6
[ 0.033000] x86_64_start_reservations+0x2a/0x2c
[ 0.033000] x86_64_start_kernel+0x77/0x7a
[ 0.033000] secondary_startup_64+0xa5/0xb0
[ 0.033000] Code: 3c 03 00 74 0c 48 c7 c7 50 b5 5b 86 e8 81 18 44 fb 48
8b 05 7a 9a f9 ff a8 08 74 0a e8 81 b7 0d fb e8 86 77 05 00 e8 77 b7 0d fb
<0f> 0b 55 48 89 e5 41 54 53 48 89 fb e8 66 b7 0d fb 48 89 da 48
[ 0.033000] RIP: start_kernel+0x71d/0x71f RSP: ffffffff85e07ea8
[ 0.033007] ---[ end trace d8d215579c2f0a00 ]---
[ 0.033660] Kernel panic - not syncing: Fatal exception
[ 0.034000] Dumping ftrace buffer:
[ 0.034000] (ftrace buffer empty)
[ 0.034000] Rebooting in 86400 seconds..
Tested on commit 1efc584c7106993783e846bbcd4c43a87e5be9fa