bisecting cause commit starting from 0011572c883082a95e02d47f45fc4a42dc0e8634 building syzkaller on 442206d76b974cca2d83ec763d4cf5ee829eb7d6 testing commit 0011572c883082a95e02d47f45fc4a42dc0e8634 with gcc (GCC) 8.1.0 all runs: crashed: WARNING in perf_reg_value testing release v5.1 testing commit e93c9c99a629c61837d5a7fc2120cd2b6c70dbdd with gcc (GCC) 8.1.0 all runs: OK # git bisect start 0011572c883082a95e02d47f45fc4a42dc0e8634 v5.1 Bisecting: 7699 revisions left to test after this (roughly 13 steps) [f4d9a23d3dad0252f375901bf4ff6523a2c97241] sparc64: simplify reduce_memory() function testing commit f4d9a23d3dad0252f375901bf4ff6523a2c97241 with gcc (GCC) 8.1.0 all runs: crashed: WARNING in perf_reg_value # git bisect bad f4d9a23d3dad0252f375901bf4ff6523a2c97241 Bisecting: 3282 revisions left to test after this (roughly 12 steps) [67a242223958d628f0ba33283668e3ddd192d057] Merge tag 'for-5.2/block-20190507' of git://git.kernel.dk/linux-block testing commit 67a242223958d628f0ba33283668e3ddd192d057 with gcc (GCC) 8.1.0 all runs: crashed: WARNING in perf_reg_value # git bisect bad 67a242223958d628f0ba33283668e3ddd192d057 Bisecting: 1665 revisions left to test after this (roughly 11 steps) [8ff468c29e9a9c3afe9152c10c7b141343270bf3] Merge branch 'x86-fpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip testing commit 8ff468c29e9a9c3afe9152c10c7b141343270bf3 with gcc (GCC) 8.1.0 all runs: crashed: WARNING in perf_reg_value # git bisect bad 8ff468c29e9a9c3afe9152c10c7b141343270bf3 Bisecting: 800 revisions left to test after this (roughly 10 steps) [8f5e823f9131a430b12f73e9436d7486e20c16f5] Merge tag 'pm-5.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm testing commit 8f5e823f9131a430b12f73e9436d7486e20c16f5 with gcc (GCC) 8.1.0 all runs: crashed: WARNING in perf_reg_value # git bisect bad 8f5e823f9131a430b12f73e9436d7486e20c16f5 Bisecting: 396 revisions left to test after this (roughly 9 steps) [0bc40e549aeea2de20fc571749de9bbfc099fb34] Merge branch 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip testing commit 0bc40e549aeea2de20fc571749de9bbfc099fb34 with gcc (GCC) 8.1.0 all runs: crashed: WARNING in perf_reg_value # git bisect bad 0bc40e549aeea2de20fc571749de9bbfc099fb34 Bisecting: 224 revisions left to test after this (roughly 8 steps) [007dc78fea62610bf06829e38f1d8c69b6ea5af6] Merge branch 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip testing commit 007dc78fea62610bf06829e38f1d8c69b6ea5af6 with gcc (GCC) 8.1.0 all runs: OK # git bisect good 007dc78fea62610bf06829e38f1d8c69b6ea5af6 Bisecting: 108 revisions left to test after this (roughly 7 steps) [a0e928ed7c603a47dca8643e58db224a799ff2c5] Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip testing commit a0e928ed7c603a47dca8643e58db224a799ff2c5 with gcc (GCC) 8.1.0 all runs: crashed: WARNING in perf_reg_value # git bisect bad a0e928ed7c603a47dca8643e58db224a799ff2c5 Bisecting: 57 revisions left to test after this (roughly 6 steps) [f447e4eb3ad1e60d173ca997fcb2ef2a66f12574] perf/x86/intel: Force resched when TFA sysctl is modified testing commit f447e4eb3ad1e60d173ca997fcb2ef2a66f12574 with gcc (GCC) 8.1.0 all runs: OK # git bisect good f447e4eb3ad1e60d173ca997fcb2ef2a66f12574 Bisecting: 31 revisions left to test after this (roughly 5 steps) [08ae95f4fd3b38b257f5dc7e6507e071c27ba0d5] nohz_full: Allow the boot CPU to be nohz_full testing commit 08ae95f4fd3b38b257f5dc7e6507e071c27ba0d5 with gcc (GCC) 8.1.0 all runs: OK # git bisect good 08ae95f4fd3b38b257f5dc7e6507e071c27ba0d5 Bisecting: 15 revisions left to test after this (roughly 4 steps) [e00d4135751bfe786a9e26b5560b185ce3f9f963] Merge branch 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip testing commit e00d4135751bfe786a9e26b5560b185ce3f9f963 with gcc (GCC) 8.1.0 all runs: crashed: WARNING in perf_reg_value # git bisect bad e00d4135751bfe786a9e26b5560b185ce3f9f963 Bisecting: 7 revisions left to test after this (roughly 3 steps) [f08c47d1f86c6dc666c7e659d94bf6d4492aa9d7] perf/x86/intel/cstate: Add Icelake support testing commit f08c47d1f86c6dc666c7e659d94bf6d4492aa9d7 with gcc (GCC) 8.1.0 all runs: crashed: WARNING in perf_reg_value # git bisect bad f08c47d1f86c6dc666c7e659d94bf6d4492aa9d7 Bisecting: 3 revisions left to test after this (roughly 2 steps) [c22497f5838c237e3094a4dfb99d1c5de6353239] perf/x86/intel: Support adaptive PEBS v4 testing commit c22497f5838c237e3094a4dfb99d1c5de6353239 with gcc (GCC) 8.1.0 all runs: crashed: WARNING in perf_reg_value # git bisect bad c22497f5838c237e3094a4dfb99d1c5de6353239 Bisecting: 1 revision left to test after this (roughly 1 step) [48f38aa4cc5a48bc0fe85c5c4b1ab171fbb539b6] perf/x86/intel: Extract memory code PEBS parser for reuse testing commit 48f38aa4cc5a48bc0fe85c5c4b1ab171fbb539b6 with gcc (GCC) 8.1.0 all runs: crashed: WARNING in perf_reg_value # git bisect bad 48f38aa4cc5a48bc0fe85c5c4b1ab171fbb539b6 Bisecting: 0 revisions left to test after this (roughly 0 steps) [878068ea270ea82767ff1d26c91583263c81fba0] perf/x86: Support outputting XMM registers testing commit 878068ea270ea82767ff1d26c91583263c81fba0 with gcc (GCC) 8.1.0 all runs: crashed: WARNING in perf_reg_value # git bisect bad 878068ea270ea82767ff1d26c91583263c81fba0 878068ea270ea82767ff1d26c91583263c81fba0 is the first bad commit commit 878068ea270ea82767ff1d26c91583263c81fba0 Author: Kan Liang Date: Tue Apr 2 12:44:59 2019 -0700 perf/x86: Support outputting XMM registers Starting from Icelake, XMM registers can be collected in PEBS record. But current code only output the pt_regs. Add a new struct x86_perf_regs for both pt_regs and xmm_regs. The xmm_regs will be used later to keep a pointer to PEBS record which has XMM information. XMM registers are 128 bit. To simplify the code, they are handled like two different registers, which means setting two bits in the register bitmap. This also allows only sampling the lower 64bit bits in XMM. The index of XMM registers starts from 32. There are 16 XMM registers. So all reserved space for regs are used. Remove REG_RESERVED. Add PERF_REG_X86_XMM_MAX, which stands for the max number of all x86 regs including both GPRs and XMM. Add REG_NOSUPPORT for 32bit to exclude unsupported registers. Previous platforms can not collect XMM information in PEBS record. Adding pebs_no_xmm_regs to indicate the unsupported platforms. The common code still validates the supported registers. However, it cannot check model specific registers, e.g. XMM. Add extra check in x86_pmu_hw_config() to reject invalid config of regs_user and regs_intr. The regs_user never supports XMM collection. The regs_intr only supports XMM collection when sampling PEBS event on icelake and later platforms. Originally-by: Andi Kleen Suggested-by: Peter Zijlstra (Intel) Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Cc: acme@kernel.org Cc: jolsa@kernel.org Link: https://lkml.kernel.org/r/20190402194509.2832-3-kan.liang@linux.intel.com Signed-off-by: Ingo Molnar :040000 040000 e77ec171f1d34b80b2f13c2ca85b2e87b3e2c0c5 4ac03685078e339dd03cdc8e8f397070351c53a5 M arch revisions tested: 16, total time: 3h6m46.120861331s (build: 1h28m47.475878086s, test: 1h33m26.58756367s) first bad commit: 878068ea270ea82767ff1d26c91583263c81fba0 perf/x86: Support outputting XMM registers cc: ["acme@kernel.org" "acme@redhat.com" "alexander.shishkin@linux.intel.com" "eranian@google.com" "jolsa@kernel.org" "jolsa@redhat.com" "kan.liang@linux.intel.com" "mingo@kernel.org" "peterz@infradead.org" "tglx@linutronix.de" "torvalds@linux-foundation.org" "vincent.weaver@maine.edu"] crash: WARNING in perf_reg_value WARNING: CPU: 0 PID: 7122 at arch/x86/kernel/perf_regs.c:71 regs_get_register arch/x86/include/asm/ptrace.h:223 [inline] WARNING: CPU: 0 PID: 7122 at arch/x86/kernel/perf_regs.c:71 perf_reg_value+0xde/0x120 arch/x86/kernel/perf_regs.c:74 Kernel panic - not syncing: panic_on_warn set ... CPU: 0 PID: 7122 Comm: syz-executor.2 Not tainted 5.1.0-rc5+ #1 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x113/0x167 lib/dump_stack.c:113 panic+0x212/0x40b kernel/panic.c:214 __warn.cold.8+0x1b/0x38 kernel/panic.c:571 report_bug+0x1a4/0x200 lib/bug.c:186 fixup_bug arch/x86/kernel/traps.c:179 [inline] do_error_trap+0x11b/0x200 arch/x86/kernel/traps.c:272 do_invalid_op+0x36/0x40 arch/x86/kernel/traps.c:291 invalid_op+0x14/0x20 arch/x86/entry/entry_64.S:973 RIP: 0010:perf_reg_value+0xde/0x120 arch/x86/kernel/perf_regs.c:71 Code: a0 00 00 00 77 26 48 01 c3 48 b8 00 00 00 00 00 fc ff df 48 89 da 48 c1 ea 03 80 3c 02 00 74 98 48 89 df e8 94 84 6b 00 eb 8e <0f> 0b 48 83 c4 08 31 c0 5b 5d c3 89 75 f0 e8 7f 84 6b 00 8b 75 f0 RSP: 0018:ffff88808e617308 EFLAGS: 00010202 RAX: 00000000fffffff9 RBX: ffff88808e617a78 RCX: 1ffff11011cc2e71 RDX: 0000000000000019 RSI: 0000000000000019 RDI: ffff88808e617a78 RBP: ffff88808e617318 R08: ffff88808e6174d8 R09: ffffed1011db9718 R10: ffff88808e6175d8 R11: ffff88808e6175c8 R12: ffff88808e6173c8 R13: ffff88808e6175b0 R14: ffff88808e617a78 R15: 1ffff11011cc2e65 perf_output_sample_regs+0xa4/0x120 kernel/events/core.c:5914 perf_output_sample+0xca2/0x18c0 kernel/events/core.c:6351 __perf_event_output kernel/events/core.c:6571 [inline] perf_event_output_forward+0x10e/0x1f0 kernel/events/core.c:6585 __perf_event_overflow+0x11c/0x310 kernel/events/core.c:8052 perf_swevent_overflow+0x62/0xc0 kernel/events/core.c:8128 perf_swevent_event+0x1f5/0x2f0 kernel/events/core.c:8161 do_perf_sw_event kernel/events/core.c:8269 [inline] ___perf_sw_event+0x25b/0x3f0 kernel/events/core.c:8300 __perf_sw_event+0x3c/0x60 kernel/events/core.c:8312 perf_sw_event include/linux/perf_event.h:1077 [inline] do_user_addr_fault arch/x86/mm/fault.c:1516 [inline] __do_page_fault+0x516/0xa20 arch/x86/mm/fault.c:1541 do_page_fault+0x64/0x3a7 arch/x86/mm/fault.c:1572 page_fault+0x1e/0x30 arch/x86/entry/entry_64.S:1143 RIP: 0010:copy_user_enhanced_fast_string+0xe/0x20 arch/x86/lib/copy_user_64.S:181 Code: 89 d1 c1 e9 03 83 e2 07 f3 48 a5 89 d1 f3 a4 31 c0 0f 1f 00 c3 0f 1f 80 00 00 00 00 0f 1f 00 83 fa 40 0f 82 70 ff ff ff 89 d1 a4 31 c0 0f 1f 00 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 83 RSP: 0018:ffff88808e617b20 EFLAGS: 00010206 RAX: 0000000000000000 RBX: 00000000200001c0 RCX: 00000000000001c0 RDX: 0000000000001000 RSI: 0000000020001000 RDI: ffff88808ec75e40 RBP: ffff88808e617b48 R08: 0000000000000000 R09: 0000000000000040 R10: ffffed1011d8ebff R11: ffff88808ec75fff R12: ffff88808ec75000 R13: ffff88808f9a0180 R14: 0000000000001000 R15: ffff88808e617ce0 copy_page_from_iter_iovec lib/iov_iter.c:294 [inline] copy_page_from_iter+0x1cd/0x7b0 lib/iov_iter.c:920 pipe_write+0x208/0xc90 fs/pipe.c:454 call_write_iter include/linux/fs.h:1866 [inline] new_sync_write+0x3ec/0x740 fs/read_write.c:474 __vfs_write+0x94/0x110 fs/read_write.c:487 vfs_write+0x150/0x4e0 fs/read_write.c:549 ksys_write+0x103/0x260 fs/read_write.c:599 __do_sys_write fs/read_write.c:611 [inline] __se_sys_write fs/read_write.c:608 [inline] __x64_sys_write+0x6e/0xb0 fs/read_write.c:608 do_syscall_64+0xd0/0x4d0 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x4592c9 Code: fd b7 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 cb b7 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007faf8ea10c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00000000004592c9 RDX: 000000010000026f RSI: 00000000200001c0 RDI: 0000000000000007 RBP: 000000000075bf20 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007faf8ea116d4 R13: 00000000004c566b R14: 00000000004df350 R15: 00000000ffffffff Kernel Offset: disabled Rebooting in 86400 seconds..