On Wed, Jul 30, 2014 at 10:07:56PM +0800, Fengguang Wu wrote: > Hi Andy, > > Here is another WARNING message for the same commit. > > commit d07c7f1ed61789e175fa975134855be32263be2c > Author: Andy Lutomirski > AuthorDate: Tue Jul 15 18:34:20 2014 -0700 > Commit: Andy Lutomirski > CommitDate: Wed Jul 16 10:01:27 2014 -0700 > > x86,kaslr: Use MSR_KVM_GET_RNG_SEED for KASLR if available > > It's considerably better than any of the alternatives on KVM. > > Rather than reinventing all of the cpu feature query code, this fixes > native_cpuid to work in PIC objects. > > I haven't combined it with boot/cpuflags.c's cpuid implementation: > including asm/processor.h from boot/cpuflags.c results in a flood of > unrelated errors, and fixing it might be messy. > > Signed-off-by: Andy Lutomirski > > +-------------------------------------------------------------------------+------------+------------+ > | | c6f07a6360 | d07c7f1ed6 | > +-------------------------------------------------------------------------+------------+------------+ > | boot_successes | 1000 | 636 | > | boot_failures | 0 | 84 | > | WARNING:CPU:PID:at_arch/x86/kernel/cpu/common.c:warn_pre_alternatives() | 0 | 84 | > | BUG:unable_to_handle_kernel_NULL_pointer_dereference | 0 | 84 | > | Oops | 0 | 84 | > | RIP:__free_pages_bootmem | 0 | 84 | > | Kernel_panic-not_syncing:Fatal_exception | 0 | 84 | > | backtrace:free_all_bootmem | 0 | 84 | > | backtrace:mem_init | 0 | 84 | > +-------------------------------------------------------------------------+------------+------------+ > > [ 0.000000] PID hash table entries: 2048 (order: 2, 16384 bytes) > [ 0.000000] xsave: enabled xstate_bv 0x7, cntxt size 0x0 > [ 0.000000] ------------[ cut here ]------------ > [ 0.000000] WARNING: CPU: 0 PID: 0 at arch/x86/kernel/cpu/common.c:1422 warn_pre_alternatives+0x1e/0x20() > [ 0.000000] You're using static_cpu_has before alternatives have run! > [ 0.000000] Modules linked in: > [ 0.000000] CPU: 0 PID: 0 Comm: swapper Not tainted 3.16.0-rc5-00004-gd07c7f1 #4 > [ 0.000000] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 > [ 0.000000] 0000000000000000 ffffffff81803c18 ffffffff813a7bd2 ffffffff81803c60 > [ 0.000000] ffffffff81803c50 ffffffff810a5485 ffffffff810102f9 ffffffff81803e08 > [ 0.000000] 0000000000000002 000000000000077c 0000000000000000 ffffffff81803cb0 > [ 0.000000] Call Trace: > [ 0.000000] [] dump_stack+0x4d/0x66 > [ 0.000000] [] warn_slowpath_common+0x7f/0x98 > [ 0.000000] [] ? warn_pre_alternatives+0x1e/0x20 > [ 0.000000] [] warn_slowpath_fmt+0x4c/0x4e > [ 0.000000] [] ? restore_args+0x30/0x30 > [ 0.000000] [] warn_pre_alternatives+0x1e/0x20 > [ 0.000000] [] __do_page_fault+0x1bd/0x7ca > [ 0.000000] [] ? console_unlock+0x377/0x3c1 > [ 0.000000] [] ? trace_hardirqs_off+0xd/0xf > [ 0.000000] [] ? _raw_spin_unlock_irqrestore+0x40/0x5e > [ 0.000000] [] ? __next_mem_range_rev+0x205/0x232 > [ 0.000000] [] ? trace_hardirqs_off_caller+0xe7/0x128 > [ 0.000000] [] ? trace_hardirqs_off_thunk+0x3a/0x3c > [ 0.000000] [] do_page_fault+0x22/0x27 > [ 0.000000] [] page_fault+0x28/0x30 > [ 0.000000] [] ? __free_pages_bootmem+0x2d/0xf9 > [ 0.000000] [] __free_memory_core+0xa7/0xbe > [ 0.000000] [] free_all_bootmem+0x51/0xd2 > [ 0.000000] [] mem_init+0x5c/0x8d > [ 0.000000] [] start_kernel+0x1f7/0x53d > [ 0.000000] [] ? set_init_arg+0x55/0x55 > [ 0.000000] [] ? early_idt_handlers+0x120/0x120 > [ 0.000000] [] x86_64_start_reservations+0x2a/0x2c > [ 0.000000] [] x86_64_start_kernel+0x140/0x14d > [ 0.000000] ---[ end trace e4962b91bd705c64 ]--- > [ 0.000000] BUG: unable to handle kernel NULL pointer dereference at 000000000000077c Interestingly, the other bisect result for the above WARNING message is commit ddfb3b363440172d62ce62fbffdf046670d3ce2b Author: Paul E. McKenney AuthorDate: Fri Jul 11 11:30:24 2014 -0700 Commit: Paul E. McKenney CommitDate: Mon Jul 14 04:48:30 2014 -0700 rcu: Create rcuo kthreads only for onlined CPUs RCU currently uses for_each_possible_cpu() to spawn rcuo kthreads, which can result in more rcuo kthreads than one would expect, for example, derRichard reported 64 CPUs worth of rcuo kthreads on an 8-CPU image. This commit therefore creates rcuo kthreads only for those CPUs that actually come online. This was reported by derRichard on the OFTC IRC network. Reported-by: Richard Weinberger Signed-off-by: Paul E. McKenney Reviewed-by: Josh Triplett =================================================== PARENT COMMIT NOT CLEAN. LOOK OUT FOR WRONG BISECT! =================================================== Attached dmesg for the parent commit, too, to help confirm whether it is a noise error. +-------------------------------------------------------------------------+------------+------------+---------------+ | | 08e8ea1b45 | ddfb3b3634 | next-20140716 | +-------------------------------------------------------------------------+------------+------------+---------------+ | boot_successes | 0 | 0 | 0 | | boot_failures | 80 | 20 | 11 | | BUG:unable_to_handle_kernel_NULL_pointer_dereference | 80 | 20 | 11 | | Oops | 80 | 20 | 11 | | RIP:__bitmap_or | 80 | 20 | 11 | | Kernel_panic-not_syncing:Fatal_exception | 80 | 20 | 11 | | backtrace:kernel_init_freeable | 80 | | | | WARNING:CPU:PID:at_arch/x86/kernel/cpu/common.c:warn_pre_alternatives() | 0 | 20 | 11 | | backtrace:async_page_fault | 0 | 20 | 11 | | backtrace:rcu_init_one | 0 | 20 | 11 | | backtrace:rcu_init | 0 | 20 | 11 | +-------------------------------------------------------------------------+------------+------------+---------------+ [ 0.000000] Preemptible hierarchical RCU implementation. [ 0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2 [ 0.000000] ------------[ cut here ]------------ [ 0.000000] WARNING: CPU: 0 PID: 0 at arch/x86/kernel/cpu/common.c:1422 warn_pre_alternatives+0x2e/0x40() [ 0.000000] You're using static_cpu_has before alternatives have run! [ 0.000000] Modules linked in: [ 0.000000] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 3.16.0-rc1-00050-gddfb3b3 #1 [ 0.000000] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 [ 0.000000] 0000000000000009 ffffffff82603bc8 ffffffff81cca80d ffffffff82603c10 [ 0.000000] ffffffff82603c00 ffffffff810e6627 0000000000000000 0000000000000000 [ 0.000000] 0000000000000000 ffffffff826186c0 00000000000000a8 ffffffff82603c60 [ 0.000000] Call Trace: [ 0.000000] [] dump_stack+0xd2/0x18e [ 0.000000] [] warn_slowpath_common+0xc7/0x100 [ 0.000000] [] warn_slowpath_fmt+0x57/0x70 [ 0.000000] [] ? print_context_stack+0x16d/0x210 [ 0.000000] [] warn_pre_alternatives+0x2e/0x40 [ 0.000000] [] __do_page_fault+0x2a6/0x1110 [ 0.000000] [] ? sched_clock_cpu+0x62/0x2b0 [ 0.000000] [] trace_do_page_fault+0x556/0x770 [ 0.000000] [] do_async_page_fault+0x3b/0x1d0 [ 0.000000] [] async_page_fault+0x28/0x30 [ 0.000000] [] ? __bitmap_or+0x38/0x50 [ 0.000000] [] rcu_init_one+0x773/0xa5c [ 0.000000] [] rcu_init+0x60a/0x6e9 [ 0.000000] [] start_kernel+0x46f/0x9f9 [ 0.000000] [] ? set_init_arg+0xec/0xec [ 0.000000] [] ? early_idt_handlers+0x120/0x120 [ 0.000000] [] x86_64_start_reservations+0x64/0x6d [ 0.000000] [] x86_64_start_kernel+0x1c5/0x1db [ 0.000000] ---[ end trace 6f39130c1118624e ]--- [ 0.000000] ------------[ cut here ]------------ git bisect start d4f4d1d45cd1b9aa60e61c2eab25a5d9a79a26f3 1795cd9b3a91d4b5473c97f491d63892442212ab -- git bisect good 8ab2f8e06b863345c4366c7b94935d105fd4ca01 # 04:50 20+ 0 Merge remote-tracking branch 'bluetooth/master' git bisect good a37140130e816ab7965645bb7f5d2d62e6ed34ca # 05:06 20+ 0 Merge remote-tracking branch 'ftrace/for-next' git bisect bad 302d91d7dd1ad5981fe014b65caac5ac3c84aed8 # 05:13 0- 3 Merge remote-tracking branch 'cgroup/for-next' git bisect bad de129c7519ac0a86b31124ba79ad05102b30681d # 05:51 0- 1 Merge remote-tracking branch 'leds/for-next' git bisect bad 67d8d9fec86b5f36a2dbecfdbe8adf59f4ce5906 # 06:34 0- 3 Merge remote-tracking branch 'xen-tip/linux-next' git bisect bad f9274c7576848a9f0385a4206c6b78bbf40da54e # 06:52 0- 20 Merge remote-tracking branch 'kvm/linux-next' git bisect bad bdc23fbab64e104ba656b931d9ed6ba9b4bc25f9 # 07:07 0- 20 Merge remote-tracking branch 'rcu/rcu/next' git bisect good b41d1b924d0bd41a225a17f39297b9de0dca93d9 # 07:16 20+ 0 rcu: Fix a sparse warning in rcu_report_unblock_qs_rnp() git bisect good e5ca9705168d0167ce68361045422acd12941be0 # 08:08 20+ 20 rcu: Remove remaining read-modify-write ACCESS_ONCE() calls git bisect good f2c8bbd3e06206b7af836d62ece5fc73c393a3f6 # 08:29 20+ 20 rcu: Return false instead of 0 in rcu_nocb_adopt_orphan_cbs() git bisect good 104c6d8fa94553b1b51f5d8094e619e4aa120b08 # 08:35 20+ 20 rcutorture: Use bash shell for all the test scripts git bisect good 08e8ea1b45c2f62aadc6dff73ade2942a28030bb # 08:41 20+ 20 rcu: Rationalize kthread spawning git bisect bad ddfb3b363440172d62ce62fbffdf046670d3ce2b # 08:47 0- 20 rcu: Create rcuo kthreads only for onlined CPUs # first bad commit: [ddfb3b363440172d62ce62fbffdf046670d3ce2b] rcu: Create rcuo kthreads only for onlined CPUs git bisect good 08e8ea1b45c2f62aadc6dff73ade2942a28030bb # 08:48 60+ 80 rcu: Rationalize kthread spawning git bisect bad d4f4d1d45cd1b9aa60e61c2eab25a5d9a79a26f3 # 08:48 0- 11 Add linux-next specific files for 20140716 git bisect good b6603fe574af289dbe9eb9fb4c540bca04f5a053 # 08:57 60+ 0 Merge tag 'for-linus-20140716' of git://git.infradead.org/linux-mtd git bisect bad d4f4d1d45cd1b9aa60e61c2eab25a5d9a79a26f3 # 08:57 0- 11 Add linux-next specific files for 20140716 This script may reproduce the error. ---------------------------------------------------------------------------- #!/bin/bash kernel=$1 kvm=( qemu-system-x86_64 -cpu kvm64 -enable-kvm -kernel $kernel -m 320 -smp 2 -net nic,vlan=1,model=e1000 -net user,vlan=1 -boot order=nc -no-reboot -watchdog i6300esb -rtc base=localtime -serial stdio -display none -monitor null ) append=( hung_task_panic=1 earlyprintk=ttyS0,115200 debug apic=debug sysrq_always_enabled rcupdate.rcu_cpu_stall_timeout=100 panic=10 softlockup_panic=1 nmi_watchdog=panic prompt_ramdisk=0 console=ttyS0,115200 console=tty0 vga=normal root=/dev/ram0 rw drbd.minor_count=8 ) "${kvm[@]}" --append "${append[*]}" ---------------------------------------------------------------------------- Thanks, Fengguang _______________________________________________ LKP mailing list LKP(a)linux.intel.com