On May 4, 2019, at 11:25 PM, kernel test robot <lkp(a)intel.com>
wrote:
FYI, we noticed the following commit (built with gcc-7):
commit: 4fc19708b165c1c152fa1f12f6600e66184b7786 ("x86/alternatives: Initialize
temporary mm for patching")
https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgit.ker...
master
in testcase: trinity
with following parameters:
runtime: 300s
test-description: Trinity is a linux system call fuzz tester.
test-url:
https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fcodemonk...
on test machine: qemu-system-x86_64 -enable-kvm -cpu SandyBridge -smp 2 -m 2G
caused below changes (please refer to attached dmesg/kmsg for entire log/backtrace):
+------------------------------------------+------------+------------+
| | 13585fa066 | 4fc19708b1 |
+------------------------------------------+------------+------------+
| boot_successes | 4 | 0 |
| boot_failures | 0 | 4 |
| kernel_BUG_at_arch/x86/mm/init.c | 0 | 4 |
| invalid_opcode:#[##] | 0 | 4 |
| EIP:poking_init | 0 | 4 |
| Kernel_panic-not_syncing:Fatal_exception | 0 | 4 |
+------------------------------------------+------------+------------+
If you fix the issue, kindly add following tag
Reported-by: kernel test robot <lkp(a)intel.com>
[ 5.118979] kernel BUG at arch/x86/mm/init.c:716!
[ 5.119018] invalid opcode: 0000 [#1] SMP
[ 5.122979] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.1.0-rc7-00022-g4fc1970 #1
[ 5.122979] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1
04/01/2014
[ 5.122979] EIP: poking_init+0x21/0xb8
[ 5.122979] Code: db 8d 65 f4 5b 5e 5f 5d c3 55 89 e5 53 52 8b 1d f8 2e 5e db 31 eb 81
f3 e3 02 89 18 e8 43 a2 1d ff a3 0c a1 56 db 85 c0 75 02 <0f> 0b d1 c3 c7 05 08 a1
56 db 00 00 00 40 b8 28 1b 48 db e8 82 a9
[ 5.122979] EAX: 00000000 EBX: 239c2c8f ECX: da865bad EDX: 00000007
[ 5.122979] ESI: 000003ca EDI: 00000000 EBP: db5bff78 ESP: db5bff70
[ 5.122979] DS: 007b ES: 007b FS: 00d8 GS: 0000 SS: 0068 EFLAGS: 00210246
[ 5.122979] CR0: 80050033 CR2: ffffffff CR3: 1b766000 CR4: 000006b0
[ 5.122979] Call Trace:
[ 5.122979] start_kernel+0x447/0x47b
[ 5.122979] i386_start_kernel+0xd6/0xee
[ 5.122979] startup_32_smp+0x15f/0x170
[ 5.122979] Modules linked in:
[ 5.123041] random: get_random_bytes called from print_oops_end_marker+0x4f/0x60 with
crng_init=0
[ 5.127013] ---[ end trace 790e10dcf838c933 ]---
To reproduce:
# build kernel
cd linux
cp config-5.1.0-rc7-00022-g4fc1970 .config
make HOSTCC=gcc-7 CC=gcc-7 ARCH=i386 olddefconfig
make HOSTCC=gcc-7 CC=gcc-7 ARCH=i386 prepare
make HOSTCC=gcc-7 CC=gcc-7 ARCH=i386 modules_prepare
make HOSTCC=gcc-7 CC=gcc-7 ARCH=i386 SHELL=/bin/bash
make HOSTCC=gcc-7 CC=gcc-7 ARCH=i386 bzImage
git clone
https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub....
cd lkp-tests
bin/lkp qemu -k <bzImage> job-script # job-script is attached in this email
Thanks,
lkp
<config-5.1.0-rc7-00022-g4fc1970><job-script.txt><dmesg.xz>
PGD cache should be initialized earlier. I will send a fix shortly.