Subject: [kbuild] fbb020c0d4: WARNING:at_kernel/trace/trace.c:#run_tracer_selftest

From: kernel test robot <[email-masked]>
Date: Sun, 5 Jul 2020 15:58:24 +0800

Greeting,

FYI, we noticed the following commit (built with gcc-9):

commit: fbb020c0d412f42903b1926d75dabba3e6ab00cc ("[PATCH] kbuild: introduce ccflags-remove-y and asflags-remove-y")
url: https://github.com/0day-ci/linux/commits/Masahiro-Yamada/kbuild-introduce-ccflags-remove-y-and-asflags-remove-y/20200628-095456
base: https://git.kernel.org/cgit/linux/kernel/git/masahiroy/linux-kbuild.git for-next

in testcase: boot

on test machine: qemu-system-x86_64 -enable-kvm -cpu SandyBridge -smp 2 -m 16G

caused below changes (please refer to attached dmesg/kmsg for entire log/backtrace):

+-----------------------------------------------------------------+------------+------------+
|                                                                 | 027ab64bdf | fbb020c0d4 |
+-----------------------------------------------------------------+------------+------------+
| boot_successes                                                  | 38         | 0          |
| boot_failures                                                   | 1          | 32         |
| WARNING:at_kernel/rcu/rcutorture.c:#rcutorture_oom_notify       | 1          |            |
| RIP:rcutorture_oom_notify                                       | 1          |            |
| canonical_address#:#[##]                                        | 1          |            |
| RIP:rcu_torture_fwd_cb_hist                                     | 1          |            |
| Kernel_panic-not_syncing:Fatal_exception                        | 1          |            |
| WARNING:at_kernel/trace/trace.c:#run_tracer_selftest            | 0          | 31         |
| RIP:run_tracer_selftest                                         | 0          | 31         |
| WARNING:at_kernel/trace/trace.c:#init_trace_selftests           | 0          | 31         |
| RIP:init_trace_selftests                                        | 0          | 31         |
| WARNING:at_kernel/trace/ftrace.c:#ftrace_init_array_ops         | 0          | 31         |
| RIP:ftrace_init_array_ops                                       | 0          | 31         |
| BUG:kernel_hang_in_boot_stage                                   | 0          | 5          |
| IP-Config:Auto-configuration_of_network_failed                  | 0          | 27         |
| WARNING:stack_going_in_the_wrong_direction?at_kernfs_add_one/0x | 0          | 1          |
| WARNING:stack_going_in_the_wrong_direction?at_wake_up_q/0x      | 0          | 2          |
+-----------------------------------------------------------------+------------+------------+

If you fix the issue, kindly add following tag
Reported-by: kernel test robot <[email-masked]>

[    7.077846] WARNING: CPU: 1 PID: 1 at kernel/trace/trace.c:1814 run_tracer_selftest+0x23d/0x2f8
[    7.077856] Modules linked in:
[    7.077883] CPU: 1 PID: 1 Comm: swapper/0 Not tainted 5.8.0-rc2-00003-gfbb020c0d412f #1
[    7.077895] RIP: 0010:run_tracer_selftest+0x23d/0x2f8
[    7.077909] Code: 11 01 4c 89 2d b1 08 d3 01 41 89 c4 85 c0 74 33 48 c7 c7 60 0b 6d 82 48 ff 05 7c 67 d2 02 e8 ae 0a f1 ff 48 ff 05 80 67 d2 02 <0f> 0b 48 ff 05 7f 67 d2 02 48 ff 05 80 67 d2 02 41 83 cc ff e9 98
[    7.077919] RSP: 0000:ffffc9000001fdb8 EFLAGS: 00010202
[    7.078092] RAX: 0000000000000007 RBX: ffffffff834802c0 RCX: 0000000000000000
[    7.078105] RDX: 0000000000000000 RSI: 0000000000000004 RDI: fffff52000003fae
[    7.078116] RBP: ffffffff83480362 R08: 0000000000000007 R09: 0000000000000000
[    7.078127] R10: ffffed1020fbf6a1 R11: ffff888107dfb507 R12: 00000000ffffffff
[    7.078140] R13: ffffffff8349a1e0 R14: 0000000000000000 R15: ffffffff83968070
[    7.078153] FS:  0000000000000000(0000) GS:ffff8883a2300000(0000) knlGS:0000000000000000
[    7.078165] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[    7.078178] CR2: 00000000000b2001 CR3: 0000000002e14000 CR4: 00000000000406a0
[    7.078191] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[    7.078202] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[    7.078212] Call Trace:
[    7.078223]  init_trace_selftests+0xf4/0x274
[    7.078235]  ? latency_fsnotify_init+0x54/0x54
[    7.078247]  do_one_initcall+0x150/0x309
[    7.078260]  ? rcu_lock_acquire+0x22/0x22
[    7.078271]  ? add_sysfs_param+0x6a0/0x6b6
[    7.078271]  ? __kasan_kmalloc+0x83/0x94
[    7.078271]  ? test_bit+0x23/0x2e
[    7.078271]  kernel_init_freeable+0x34e/0x3d0
[    7.078271]  ? rest_init+0x122/0x122
[    7.078271]  kernel_init+0xd/0x116
[    7.078271]  ret_from_fork+0x22/0x30
[    7.078271] ---[ end trace b31ab4834bc3402a ]---

To reproduce:

        # build kernel
	cd linux
	cp config-5.8.0-rc2-00003-gfbb020c0d412f .config
	make HOSTCC=gcc-9 CC=gcc-9 ARCH=x86_64 olddefconfig prepare modules_prepare bzImage

        git clone https://github.com/intel/lkp-tests.git
        cd lkp-tests
        bin/lkp qemu -k <bzImage> job-script # job-script is attached in this email

Thanks,
lkp