Re: [x86/vsyscall] 3dc33bd30f Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b

From: Chunyu Hu
Date: Tue Feb 21 2017 - 19:49:54 EST


I have a similar call trace on Fedora25.

[ 2.527391] Freeing unused kernel memory: 1688K (ffffffffbdf66000 -
ffffffffbe10c000)
[ 2.535222] Write protecting the kernel read-only data: 14336k
[ 2.542679] Freeing unused kernel memory: 1892K (ffff94cb30827000 -
ffff94cb30a00000)
[ 2.553482] Freeing unused kernel memory: 700K (ffff94cb30d51000 -
ffff94cb30e00000)
[ 2.572048] x86/mm: Checked W+X mappings: passed, no W+X pages found.
Fatal: [ 2.598239] traps: init[1] general protection
ip:7fc841bfc642 sp:7ffc3fd85870 error:0no entropy gathering module
dete[ 2.606473] in libc-2.24.so[7fc841bc5000+1bd000]
cted
[ 2.617089] Kernel panic - not syncing: Attempted to kill init!
exitcode=0x0000000b
[ 2.617089]
[ 2.618006] CPU: 1 PID: 1 Comm: init Not tainted 4.9.9-200.fc25.x86_64 #1
[ 2.618006] Hardware name: NEC Express5800/120Rf-1 [N8100-1212]
/MS-9146-11A, BIOS 6.0.2N18 05/30/2006
[ 2.618006] ffffb09180197c38 ffffffffbd3f467d ffff94cb3e30d700
ffffffffbdc3a268
[ 2.618006] ffffb09180197cc0 ffffffffbd1bfe28 ffff94cb00000010
ffffb09180197cd0
[ 2.618006] ffffb09180197c68 000000001acaa185 ffff94cb3e30d7c0
000000000000000b
[ 2.618006] Call Trace:
[ 2.618006] [<ffffffffbd3f467d>] dump_stack+0x63/0x86
[ 2.618006] [<ffffffffbd1bfe28>] panic+0xe4/0x22d
[ 2.618006] [<ffffffffbd0a6e81>] do_exit+0xaf1/0xb00
[ 2.618006] [<ffffffffbd0a6f17>] do_group_exit+0x47/0xb0
[ 2.618006] [<ffffffffbd0b23a9>] get_signal+0x289/0x630
[ 2.618006] [<ffffffffbd026067>] do_signal+0x37/0x690
[ 2.618006] [<ffffffffbd0ce830>] ? wake_up_state+0x10/0x20
[ 2.618006] [<ffffffffbd0afc85>] ? signal_wake_up_state+0x25/0x30
[ 2.618006] [<ffffffffbd0afdbd>] ? complete_signal+0xfd/0x1e0
[ 2.618006] [<ffffffffbd0b074e>] ? send_signal+0x3e/0x80
[ 2.719026] [<ffffffffbd003286>] exit_to_usermode_loop+0x76/0xb0
[ 2.719026] [<ffffffffbd003af0>] prepare_exit_to_usermode+0x40/0x50
[ 2.729016] [<ffffffffbd81e86f>] retint_user+0x8/0x10
[ 2.729016] Kernel Offset: 0x3c000000 from 0xffffffff81000000
(relocation range: 0xffffffff80000000-0xffffffffbfffffff)
[ 2.729016] ---[ end Kernel panic - not syncing: Attempted to kill
init! exitcode=0x0000000b
[ 2.729016]
[ 2.759787] ------------[ cut here ]------------
[ 2.760784] WARNING: CPU: 1 PID: 1 at arch/x86/kernel/smp.c:127
native_smp_send_reschedule+0x3a/0x40
[ 2.760784] Modules linked in:
[ 2.760784] CPU: 1 PID: 1 Comm: init Not tainted 4.9.9-200.fc25.x86_64 #1
[ 2.760784] Hardware name: NEC Express5800/120Rf-1 [N8100-1212]
/MS-9146-11A, BIOS 6.0.2N18 05/30/2006
[ 2.760784] ffff94cb3fd03de8 ffffffffbd3f467d 0000000000000000
0000000000000000
[ 2.760784] ffff94cb3fd03e28 ffffffffbd0a205b 0000007f3fd19670
0000000000000000
[ 2.760784] ffff94cb3fc19600 0000000000000001 00000000fffb76e8
ffff94cb3fd12768
[ 2.760784] Call Trace:
[ 2.760784] <IRQ> [ 2.760784] [<ffffffffbd3f467d>] dump_stack+0x63/0x86
[ 2.760784] [<ffffffffbd0a205b>] __warn+0xcb/0xf0
[ 2.760784] [<ffffffffbd0a218d>] warn_slowpath_null+0x1d/0x20
[ 2.760784] [<ffffffffbd04973a>] native_smp_send_reschedule+0x3a/0x40
[ 2.760784] [<ffffffffbd0e200e>] trigger_load_balance+0x12e/0x1f0
[ 2.760784] [<ffffffffbd0cf48c>] scheduler_tick+0x9c/0xd0
[ 2.760784] [<ffffffffbd124270>] ? tick_sched_do_timer+0x50/0x50
[ 2.760784] [<ffffffffbd113e67>] update_process_times+0x47/0x60
[ 2.760784] [<ffffffffbd123bc5>] tick_sched_handle.isra.15+0x25/0x60
[ 2.760784] [<ffffffffbd1242ad>] tick_sched_timer+0x3d/0x70
[ 2.760784] [<ffffffffbd1148ce>] __hrtimer_run_queues+0xee/0x260
[ 2.760784] [<ffffffffbd11505a>] hrtimer_interrupt+0x9a/0x180
[ 2.760784] [<ffffffffbd04bf08>] local_apic_timer_interrupt+0x38/0x60
[ 2.760784] [<ffffffffbd820a6d>] smp_apic_timer_interrupt+0x3d/0x50
[ 2.760784] [<ffffffffbd81fc2c>] apic_timer_interrupt+0x8c/0xa0
[ 2.760784] <EOI> [ 2.760784] [<ffffffffbd1bff31>] ? panic+0x1ed/0x22d
[ 2.760784] [<ffffffffbd1bff2a>] ? panic+0x1e6/0x22d
[ 2.760784] [<ffffffffbd0a6e81>] do_exit+0xaf1/0xb00
[ 2.760784] [<ffffffffbd0a6f17>] do_group_exit+0x47/0xb0
[ 2.760784] [<ffffffffbd0b23a9>] get_signal+0x289/0x630
[ 2.760784] [<ffffffffbd026067>] do_signal+0x37/0x690
[ 2.760784] [<ffffffffbd0ce830>] ? wake_up_state+0x10/0x20
[ 2.760784] [<ffffffffbd0afc85>] ? signal_wake_up_state+0x25/0x30
[ 2.760784] [<ffffffffbd0afdbd>] ? complete_signal+0xfd/0x1e0
[ 2.760784] [<ffffffffbd0b074e>] ? send_signal+0x3e/0x80
[ 2.760784] [<ffffffffbd003286>] exit_to_usermode_loop+0x76/0xb0
[ 2.760784] [<ffffffffbd003af0>] prepare_exit_to_usermode+0x40/0x50
[ 2.760784] [<ffffffffbd81e86f>] retint_user+0x8/0x10
[ 2.760784] ---[ end trace 700147443b06188a ]---

On 22 February 2017 at 03:07, Kees Cook <keescook@xxxxxxxxxxxx> wrote:
> On Fri, Feb 17, 2017 at 9:27 PM, Fengguang Wu <fengguang.wu@xxxxxxxxx> wrote:
>> Hi Kees,
>>
>> It's an old patch, however the panic still happens in linux-next 20170217.
>
> What version of glibc is running in the yocto image you're booting
> with? For it to support CONFIG_LEGACY_VSYSCALL_NONE=y
>
> This is reported in the second one you sent:
>
> [ 3.292740] init[1] vsyscall attempted with vsyscall=none
> ip:ffffffffff600400 cs:33 sp:7fff40d03bb8 ax:ffffffffff600400
> si:7fc21c995a4c di:7fff40d03c78
>
> I.e. init is expecting to use vsyscalls (it's too old a binary).
>
> glibc 2.14 and later don't require the vsyscall table (as noted in the Kconfig).
>
> -Kees
>
>>
>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
>>
>> commit 3dc33bd30f3e1c1bcaaafa3482737694debf0f0b
>> Author: Kees Cook <keescook@xxxxxxxxxxxx>
>> AuthorDate: Wed Aug 12 17:55:19 2015 -0700
>> Commit: Ingo Molnar <mingo@xxxxxxxxxx>
>> CommitDate: Sun Sep 20 10:31:06 2015 +0200
>>
>> x86/entry/vsyscall: Add CONFIG to control default
>>
>> Most modern systems can run with vsyscall=none. In an effort to
>> provide a way for build-time defaults to lack legacy settings,
>> this adds a new CONFIG to select the type of vsyscall mapping to
>> use, similar to the existing "vsyscall" command line parameter.
>>
>> Signed-off-by: Kees Cook <keescook@xxxxxxxxxxxx>
>> Acked-by: Andy Lutomirski <luto@xxxxxxxxxxxxxx>
>> Cc: Borislav Petkov <bp@xxxxxxxxx>
>> Cc: Brian Gerst <brgerst@xxxxxxxxx>
>> Cc: Denys Vlasenko <dvlasenk@xxxxxxxxxx>
>> Cc: H. Peter Anvin <hpa@xxxxxxxxx>
>> Cc: Josh Triplett <josh@xxxxxxxxxxxxxxxx>
>> Cc: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
>> Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
>> Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
>> Link: http://lkml.kernel.org/r/20150813005519.GA11696@xxxxxxxxxxxxxxx
>> Signed-off-by: Ingo Molnar <mingo@xxxxxxxxxx>
>>
>> +-----------------------------------------------------------+------------+------------+-----------+
>> | | c25be94f28 | 3dc33bd30f | v4.10-rc8 |
>> +-----------------------------------------------------------+------------+------------+-----------+
>> | boot_successes | 252 | 32 | 25 |
>> | boot_failures | 0 | 56 | 31 |
>> | Kernel_panic-not_syncing:Attempted_to_kill_init!exitcode= | 0 | 54 | 28 |
>> | BUG:kernel_reboot-without-warning_in_boot_stage | 0 | 2 | |
>> | BUG:kernel_hang_in_test_stage | 0 | 0 | 2 |
>> | BUG:kernel_reboot-without-warning_in_test_stage | 0 | 0 | 1 |
>> +-----------------------------------------------------------+------------+------------+-----------+
>>
>> [ 12.110061] floppy: error -5 while reading block 0
>> [ 12.130066] floppy: error -5 while reading block 0
>> [ 12.198488] gfs2: path_lookup on rootfs returned error -2
>> [ 12.203718] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
>> [ 12.203718]
>> [ 12.206760] CPU: 0 PID: 1 Comm: init Not tainted 4.3.0-rc1-00133-g3dc33bd #1
>> [ 12.208393] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.9.3-20161025_171302-gandalf 04/01/2014
>> [ 12.210006] 0000000000000000 ffff88001e8cfca8 ffffffff8133b2e0 ffff88001e8cfd28
>> [ 12.210006] ffffffff810dd97a ffffffff00000010 ffff88001e8cfd38 ffff88001e8cfcd0
>> [ 12.210006] ffff88001e8d8000 000000000000000b ffff88001e8e4010 0000000000000001
>> [ 12.210006] Call Trace:
>> [ 12.210006] [<ffffffff8133b2e0>] dump_stack+0x19/0x1b
>> [ 12.210006] [<ffffffff810dd97a>] panic+0xb5/0x1db
>> [ 12.210006] [<ffffffff810827cd>] do_exit+0x3fa/0x7d9
>> [ 12.210006] [<ffffffff81082c11>] do_group_exit+0x39/0xa1
>> [ 12.210006] [<ffffffff8108a9eb>] get_signal+0x4a0/0x4e1
>> [ 12.210006] [<ffffffff8100b0d0>] do_signal+0x23/0x440
>> [ 12.210006] [<ffffffff81340389>] ? ___ratelimit+0xc8/0xe2
>> [ 12.210006] [<ffffffff810ab375>] ? __printk_ratelimit+0x13/0x15
>> [ 12.210006] [<ffffffff81003798>] ? warn_bad_vsyscall+0x2e/0x83
>> [ 12.210006] [<ffffffff810391bf>] ? bad_area_nosemaphore+0xe/0x10
>> [ 12.210006] [<ffffffff810394c2>] ? __do_page_fault+0x15e/0x345
>> [ 12.210006] [<ffffffff81003290>] prepare_exit_to_usermode+0x74/0x9d
>> [ 12.210006] [<ffffffff81a6c0a2>] retint_user+0x8/0x10
>> [ 12.210006] Kernel Offset: disabled
>>
>> Elapsed time: 20
>>
>> git bisect start v4.4 v4.3 --
>> git bisect bad cd6caf550a2adc763c6301ecc0be01f422fb2aea # 02:16 7- 9 Merge tag 'for-linus-4.4' of git://git.code.sf.net/p/openipmi/linux-ipmi
>> git bisect bad 713009809681e5a7871e96e6992692c805b4480b # 02:30 0- 2 Merge tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4
>> git bisect bad ccf21b69a83afaee4d5499e0d03eacf23946e08c # 02:41 0- 12 Merge branch 'for-4.4/reservations' of git://git.kernel.dk/linux-block
>> git bisect good b831ef2cad979912850e34f82415c0c5d59de8cb # 02:58 59+ 0 Merge branch 'ras-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
>> git bisect bad ccc9d4a6d640cbde05d519edeb727881646cf71b # 03:14 30- 5 Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
>> git bisect bad f323c49b300baf89e2cb4050b0def1856c0b1852 # 03:24 0- 15 Merge branch 'x86-cpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
>> git bisect bad a75a3f6fc92888e4119744d8594ffdf748c3d444 # 03:35 0- 6 Merge branch 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
>> git bisect good 53528695ff6d8b77011bc818407c13e30914a946 # 03:56 81+ 0 Merge branch 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
>> git bisect good d2bea739f8b41d620c235d81e00289d01169dc3c # 04:13 82+ 0 Merge branch 'x86-apic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
>> git bisect bad 034042cc1e2837a584cda0a5e4fc2b0a96b74543 # 04:22 0- 1 x86/entry/syscalls: Move syscall table declarations into asm/syscalls.h
>> git bisect bad dd27f998f0ed3c797032a82033fa191be7c61e4c # 04:36 2- 2 x86/entry/64/compat: Fix SYSENTER's NT flag before user memory access
>> git bisect bad 0b101e62afe626ecae60173f92f1e0ec72151653 # 04:45 0- 3 x86/asm: Force inlining of cpu_relax()
>> git bisect bad 93f13a9f96771a064c716364aebc6e283b186eb8 # 05:00 0- 5 x86/entry/vsyscall: Fix undefined symbol warning
>> git bisect bad 3dc33bd30f3e1c1bcaaafa3482737694debf0f0b # 05:18 1- 3 x86/entry/vsyscall: Add CONFIG to control default
>> git bisect good c25be94f2870bf75552a41ad8b15f756e19ffb1d # 06:28 81+ 0 x86/asm/entry/32, selftests: Add 'test_syscall_vdso' test
>> # first bad commit: [3dc33bd30f3e1c1bcaaafa3482737694debf0f0b] x86/entry/vsyscall: Add CONFIG to control default
>> git bisect good c25be94f2870bf75552a41ad8b15f756e19ffb1d # 08:36 242+ 0 x86/asm/entry/32, selftests: Add 'test_syscall_vdso' test
>> # extra tests with CONFIG_DEBUG_INFO_REDUCED
>> git bisect bad 3dc33bd30f3e1c1bcaaafa3482737694debf0f0b # 08:45 0- 1 x86/entry/vsyscall: Add CONFIG to control default
>> # extra tests on HEAD of linus/master
>> git bisect bad 747ae0a96f1a78b35c5a3d93ad37a16655e16340 # 09:03 0- 1 Merge tag 'media/v4.10-4' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media
>> # extra tests on tree/branch linus/master
>> git bisect bad 6dc39c50e4aeb769c8ae06edf2b1a732f3490913 # 09:17 5- 2 Merge branch 'for-linus' of git://git.kernel.dk/linux-block
>> # extra tests on tree/branch linus/master
>> git bisect bad 6dc39c50e4aeb769c8ae06edf2b1a732f3490913 # 09:17 0- 2 Merge branch 'for-linus' of git://git.kernel.dk/linux-block
>> # extra tests on tree/branch linux-next/master
>> git bisect bad 4ce4a759a3e221b5265ebd03c2f8888b69a7cf3e # 09:40 0- 1 Add linux-next specific files for 20170217
>>
>>
>> ---
>> 0-DAY kernel test infrastructure Open Source Technology Center
>> https://lists.01.org/pipermail/lkp Intel Corporation
>
>
>
> --
> Kees Cook
> Pixel Security