Mohammed Gamal
1f3aed0147
hv: clocksource: Add notrace attribute to read_hv_sched_clock_*() functions
...
When selecting function_graph tracer with the command:
# echo function_graph > /sys/kernel/debug/tracing/current_tracer
The kernel crashes with the following stack trace:
[69703.122389] BUG: stack guard page was hit at 000000001056545c (stack is 00000000fa3f8fed..0000000005d39503)
[69703.122403] kernel stack overflow (double-fault): 0000 [#1 ] SMP PTI
[69703.122413] CPU: 0 PID: 16982 Comm: bash Kdump: loaded Not tainted 4.18.0-236.el8.x86_64 #1
[69703.122420] Hardware name: Microsoft Corporation Virtual Machine/Virtual Machine, BIOS Hyper-V UEFI Release v4.0 12/17/2019
[69703.122433] RIP: 0010repare_ftrace_return+0xa/0x110
[69703.122458] Code: 05 00 0f 0b 48 c7 c7 10 ca 69 ae 0f b6 f0 e8 4b 52 0c 00 31 c0 eb ca 66 0f 1f 84 00 00 00 00 00 55 48 89 e5 41 56 41 55 41 54 <53> 48 83 ec 18 65 48 8b 04 25 28 00 00 00 48 89 45 d8 31 c0 48 85
[69703.122467] RSP: 0018:ffffbd6d01118000 EFLAGS: 00010086
[69703.122476] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000003
[69703.122484] RDX: 0000000000000000 RSI: ffffbd6d011180d8 RDI: ffffffffadce7550
[69703.122491] RBP: ffffbd6d01118018 R08: 0000000000000000 R09: ffff9d4b09266000
[69703.122498] R10: ffff9d4b0fc04540 R11: ffff9d4b0fc20a00 R12: ffff9d4b6e42aa90
[69703.122506] R13: ffff9d4b0fc20ab8 R14: 00000000000003e8 R15: ffffbd6d0111837c
[69703.122514] FS: 00007fd5f2588740(0000) GS:ffff9d4b6e400000(0000) knlGS:0000000000000000
[69703.122521] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[69703.122528] CR2: ffffbd6d01117ff8 CR3: 00000000565d8001 CR4: 00000000003606f0
[69703.122538] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[69703.122545] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[69703.122552] Call Trace:
[69703.122568] ftrace_graph_caller+0x6b/0xa0
[69703.122589] ? read_hv_sched_clock_tsc+0x5/0x20
[69703.122599] read_hv_sched_clock_tsc+0x5/0x20
[69703.122611] sched_clock+0x5/0x10
[69703.122621] sched_clock_local+0x12/0x80
[69703.122631] sched_clock_cpu+0x8c/0xb0
[69703.122644] trace_clock_global+0x21/0x90
[69703.122655] ring_buffer_lock_reserve+0x100/0x3c0
[69703.122671] trace_buffer_lock_reserve+0x16/0x50
[69703.122683] __trace_graph_entry+0x28/0x90
[69703.122695] trace_graph_entry+0xfd/0x1a0
[69703.122705] ? read_hv_clock_tsc_cs+0x10/0x10
[69703.122714] ? sched_clock+0x5/0x10
[69703.122723] prepare_ftrace_return+0x99/0x110
[69703.122734] ? read_hv_clock_tsc_cs+0x10/0x10
[69703.122743] ? sched_clock+0x5/0x10
[69703.122752] ftrace_graph_caller+0x6b/0xa0
[69703.122768] ? read_hv_clock_tsc_cs+0x10/0x10
[69703.122777] ? sched_clock+0x5/0x10
[69703.122786] ? read_hv_sched_clock_tsc+0x5/0x20
[69703.122796] ? ring_buffer_unlock_commit+0x1d/0xa0
[69703.122805] read_hv_sched_clock_tsc+0x5/0x20
[69703.122814] ftrace_graph_caller+0xa0/0xa0
[ ... recursion snipped ... ]
Setting the notrace attribute for read_hv_sched_clock_msr() and
read_hv_sched_clock_tsc() fixes it.
Fixes: bd00cd52d5be ("clocksource/drivers/hyperv: Add Hyper-V specific sched clock function")
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: Mohammed Gamal <mgamal@redhat.com>
Link: https://lore.kernel.org/r/20200924151117.767442-1-mgamal@redhat.com
Signed-off-by: Wei Liu <wei.liu@kernel.org>
2020-09-28 09:04:48 +00:00
..
2019-06-19 17:09:07 +02:00
2020-05-22 23:58:56 +02:00
2020-07-08 21:57:51 +01:00
2019-06-19 17:09:55 +02:00
2019-05-30 11:29:22 -07:00
2019-11-04 10:40:10 +01:00
2020-02-27 12:15:24 +01:00
2020-02-27 12:15:24 +01:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:29:22 -07:00
2019-05-30 11:26:32 -07:00
2019-06-19 17:09:55 +02:00
2020-05-23 00:02:59 +02:00
2020-05-23 00:02:41 +02:00
2020-01-16 19:06:57 +01:00
2020-02-27 12:15:24 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2020-09-28 09:04:48 +00:00
2018-11-04 11:04:46 +01:00
2020-02-27 09:37:29 +01:00
2020-07-23 16:58:09 +02:00
2020-07-23 16:57:19 +02:00
2017-06-14 11:58:45 +02:00
2020-08-15 08:09:38 -07:00
2020-08-15 08:09:38 -07:00
2020-05-23 00:03:16 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2020-02-27 12:15:24 +01:00
2020-07-23 16:57:43 +02:00
2019-06-05 17:36:37 +02:00
2019-11-04 10:38:46 +01:00
2020-02-27 12:15:24 +01:00
2019-05-30 11:26:32 -07:00
2020-07-23 16:57:43 +02:00
2020-01-06 09:45:59 +01:00
2020-01-06 09:45:59 +01:00
2018-10-03 14:37:02 +02:00
2018-07-26 11:26:30 +02:00
2020-02-27 12:15:24 +01:00
2019-06-19 17:09:55 +02:00
2020-04-15 10:57:15 +02:00
2020-07-11 18:58:24 +02:00
2020-01-16 19:06:57 +01:00
2020-03-12 19:23:06 +01:00
2020-04-09 12:13:20 +02:00
2017-06-14 11:58:45 +02:00
2020-02-27 12:15:24 +01:00
2020-02-27 12:15:24 +01:00
2020-02-21 09:28:38 +01:00
2018-11-02 19:41:12 +01:00
2020-02-27 12:15:24 +01:00
2020-03-17 10:11:45 +01:00
2020-04-09 16:24:50 +02:00
2020-02-27 12:15:24 +01:00
2019-06-25 19:49:18 +02:00
2019-06-19 17:09:55 +02:00
2018-10-03 14:37:02 +02:00
2019-10-16 17:04:50 +02:00
2020-02-27 12:15:24 +01:00
2020-03-16 11:19:37 +01:00
2019-05-02 21:55:58 +02:00
2018-12-31 23:17:23 +08:00
2019-08-27 00:31:39 +02:00
2017-06-14 11:58:45 +02:00
2019-11-04 18:49:13 +01:00
2018-01-08 17:57:24 +01:00
2020-02-27 12:15:24 +01:00
2020-02-27 09:42:00 +01:00
2019-05-30 11:29:52 -07:00
2018-10-03 14:37:02 +02:00
2020-02-27 12:15:24 +01:00
2020-03-28 11:25:44 +01:00
2020-02-27 12:15:24 +01:00
2019-06-05 17:36:37 +02:00
2018-12-18 22:22:23 +01:00
2020-06-09 19:11:22 -07:00
2019-06-19 17:09:55 +02:00
2020-02-27 12:15:24 +01:00
2017-11-02 11:10:55 +01:00
2018-07-26 11:26:34 +02:00
2020-06-18 11:19:58 +01:00
2019-05-30 11:29:22 -07:00
2019-08-27 00:31:39 +02:00
2019-02-23 12:13:45 +01:00
2019-02-23 12:13:45 +01:00
2019-06-25 19:49:18 +02:00
2020-07-23 16:57:43 +02:00
2020-07-21 15:48:33 +02:00
2020-07-23 16:57:43 +02:00
2020-02-27 12:15:24 +01:00
2020-05-23 00:03:25 +02:00
2020-04-05 09:24:58 +02:00
2020-02-27 12:15:24 +01:00
2020-02-27 12:15:24 +01:00