[5.7-rc5 x86 regression] ORC unwinder generates unreliable traces

From: Tetsuo Handa
Date: Thu May 21 2020 - 19:35:22 EST


Hello.

syzbot is troubled by CONFIG_UNWINDER_ORC=y .

As of commit d2f8825ab78e4c18 ("Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost"),
sched_show_task() is defunctional (all threads' traces are marked as 'unreliable').

[ 43.975229] sysrq: Show State
[ 43.978609] task PC stack pid father
[ 43.981856] systemd S11664 1 0 0x00000000
[ 43.984118] Call Trace:
[ 43.985626] ? __schedule+0x27d/0x770
[ 43.987738] ? schedule+0x5a/0xd0
[ 43.989509] ? schedule_hrtimeout_range_clock+0x11c/0x130
[ 43.991702] ? ep_poll+0x461/0x4f0
[ 43.993384] ? _raw_write_unlock_irq+0x1f/0x30
[ 43.995343] ? ep_poll+0x472/0x4f0
[ 43.997053] ? wait_woken+0xa0/0xa0
[ 43.998763] ? do_epoll_wait+0xcd/0xf0
[ 44.000494] ? __x64_sys_epoll_wait+0x15/0x20
[ 44.002385] ? do_syscall_64+0x45/0x1d0
[ 44.004158] ? entry_SYSCALL_64_after_hwframe+0x49/0xb3

Since v5.7-rc5 is bad and v5.7-rc4 is good, the culprit is commit c14cab2688d09b85
("Merge tag 'x86-urgent-2020-05-10' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip")
which contains

Pull x86 fixes from Thomas Gleixner:
"A set of fixes for x86:
(...snipped...)
- A series of fixes for objtool and the ORC unwinder addressing
variety of small issues:

in the log.

----------
Kernel 5.7.0-rc6-00069-gd2f8825ab78e on an x86_64

localhost login: [ 43.975229][ C6] sysrq: Show State
[ 43.978609][ C6] task PC stack pid father
[ 43.981856][ C6] systemd S11664 1 0 0x00000000
[ 43.984118][ C6] Call Trace:
[ 43.985626][ C6] ? __schedule+0x27d/0x770
[ 43.987738][ C6] ? schedule+0x5a/0xd0
[ 43.989509][ C6] ? schedule_hrtimeout_range_clock+0x11c/0x130
[ 43.991702][ C6] ? ep_poll+0x461/0x4f0
[ 43.993384][ C6] ? _raw_write_unlock_irq+0x1f/0x30
[ 43.995343][ C6] ? ep_poll+0x472/0x4f0
[ 43.997053][ C6] ? wait_woken+0xa0/0xa0
[ 43.998763][ C6] ? do_epoll_wait+0xcd/0xf0
[ 44.000494][ C6] ? __x64_sys_epoll_wait+0x15/0x20
[ 44.002385][ C6] ? do_syscall_64+0x45/0x1d0
[ 44.004158][ C6] ? entry_SYSCALL_64_after_hwframe+0x49/0xb3

----------
Kernel 5.7.0-rc5 on an x86_64

localhost login: [ 33.662344][ C6] sysrq: Show State
[ 33.663434][ C6] task PC stack pid father
[ 33.665144][ C6] systemd S11968 1 0 0x00000000
[ 33.666724][ C6] Call Trace:
[ 33.667603][ C6] ? __schedule+0x27d/0x770
[ 33.668692][ C6] ? schedule+0x5a/0xd0
[ 33.669834][ C6] ? schedule_hrtimeout_range_clock+0x11c/0x130
[ 33.671397][ C6] ? ep_poll+0x29e/0x4d0
[ 33.672494][ C6] ? _raw_write_unlock_irq+0x1f/0x30
[ 33.673811][ C6] ? ep_poll+0x45c/0x4d0
[ 33.674839][ C6] ? wait_woken+0xa0/0xa0
[ 33.676000][ C6] ? do_epoll_wait+0xcd/0xf0
[ 33.677184][ C6] ? __x64_sys_epoll_wait+0x15/0x20
[ 33.678433][ C6] ? do_syscall_64+0x45/0x1d0
[ 33.679637][ C6] ? entry_SYSCALL_64_after_hwframe+0x49/0xb3

----------
Kernel 5.7.0-rc4 on an x86_64

localhost login: [ 35.448925][ C6] sysrq: Show State
[ 35.450252][ C6] task PC stack pid father
[ 35.452227][ C6] systemd S11944 1 0 0x00000000
[ 35.454001][ C6] Call Trace:
[ 35.454983][ C6] ? __schedule+0x27d/0x770
[ 35.456288][ C6] schedule+0x5a/0xd0
[ 35.457393][ C6] schedule_hrtimeout_range_clock+0x11c/0x130
[ 35.459106][ C6] ? ep_poll+0x40b/0x4c0
[ 35.460306][ C6] ? _raw_write_unlock_irq+0x1f/0x30
[ 35.461840][ C6] ep_poll+0x38f/0x4c0
[ 35.463017][ C6] ? wake_up_q+0x90/0x90
[ 35.464230][ C6] do_epoll_wait+0xcd/0xf0
[ 35.465464][ C6] __x64_sys_epoll_wait+0x15/0x20
[ 35.466878][ C6] do_syscall_64+0x45/0x1d0
[ 35.468073][ C6] entry_SYSCALL_64_after_hwframe+0x49/0xb3
[ 35.469657][ C6] RIP: 0033:0x7f1f191b0e93
[ 35.470910][ C6] Code: Bad RIP value.
[ 35.472046][ C6] RSP: 002b:00007fffc4c25c88 EFLAGS: 00000246 ORIG_RAX: 00000000000000e8
[ 35.474303][ C6] RAX: ffffffffffffffda RBX: 00007fffc4c25c90 RCX: 00007f1f191b0e93
[ 35.476852][ C6] RDX: 0000000000000035 RSI: 00007fffc4c25c90 RDI: 0000000000000004
[ 35.479254][ C6] RBP: 00007fffc4c26000 R08: 9c23bff2734474f6 R09: 000055ec811556e0
[ 35.481458][ C6] R10: 00000000ffffffff R11: 0000000000000246 R12: 0000000000000001
[ 35.483643][ C6] R13: ffffffffffffffff R14: 0000000000000000 R15: 000055ec81fd23b0

----------