perf-fuzz
perf-fuzz copied to clipboard
Kernel OOPS on snapshot-test on Ubuntu 16.04
Compiled the kernel with your patches. CONFIG_SNAPSHOT was enabled.
However, on snapshot-test it OOPS
[ 744.520610] BUG: unable to handle kernel paging request at 00000000006021d0
[ 744.522343] IP: [<ffffffff8e8a763b>] reserve_context+0x5b/0x70
[ 744.524086] PGD 4e0aae067 PUD 54917d067 PMD 4f6148067 PTE 80000004abec1867
[ 744.525834] Oops: 0001 [#7] SMP
[ 744.527523] Modules linked in: xt_CHECKSUM iptable_mangle ipt_MASQUERADE nf_nat_masquerade_ipv4 iptable_nat nf_nat_ipv4 nf_nat nf_conntrack_ipv4 nf_defrag_ipv4 xt_conntrack nf_conntrack ipt_REJECT nf_reject_ipv4 xt_tcpudp bridge stp llc ccm rfcomm ebtable_filter ebtables ip6table_filter ip6_tables iptable_filter ip_tables x_tables overlay bnep binfmt_misc nls_iso8859_1 arc4 snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic iwlmvm mac80211 intel_rapl x86_pkg_temp_thermal coretemp snd_soc_skl snd_soc_skl_ipc snd_soc_sst_ipc snd_soc_sst_dsp snd_hda_ext_core snd_soc_sst_match snd_soc_core snd_compress snd_pcm_dmaengine ac97_bus snd_hda_intel snd_hda_codec snd_hda_core snd_hwdep snd_pcm kvm_intel uvcvideo kvm snd_seq_midi videobuf2_vmalloc irqbypass videobuf2_memops snd_seq_midi_event videobuf2_v4l2
[ 744.534349] videobuf2_core videodev snd_rawmidi media snd_seq snd_seq_device snd_timer joydev input_leds serio_raw btusb btrtl iwlwifi snd cfg80211 soundcore hci_uart btbcm btqca btintel mei_me intel_pch_thermal bluetooth mei shpchp mac_hid intel_lpss_acpi intel_lpss acpi_pad parport_pc ppdev lp parport autofs4 algif_skcipher af_alg dm_crypt hid_generic usbhid uas usb_storage crct10dif_pclmul crc32_pclmul ghash_clmulni_intel i915 aesni_intel aes_x86_64 lrw glue_helper ablk_helper cryptd i2c_algo_bit psmouse e1000e drm_kms_helper syscopyarea ptp sysfillrect pps_core sysimgblt nvme fb_sys_fops nvme_core drm wmi video i2c_hid pinctrl_sunrisepoint pinctrl_intel hid fjes
[ 744.541350] CPU: 1 PID: 12253 Comm: test Tainted: G D 4.8.10 #1
[ 744.545184] task: ffff968660ab8000 task.stack: ffff9686c9700000
[ 744.547596] RIP: 0010:[<ffffffff8e8a763b>] [<ffffffff8e8a763b>] reserve_context+0x5b/0x70
[ 744.550537] RSP: 0018:ffff9686c9703f10 EFLAGS: 00010286
[ 744.552796] RAX: ffff9686a42e07a0 RBX: ffff968660ab8000 RCX: 000000000001b78e
[ 744.554675] RDX: ffff968659cac000 RSI: 0000000002080020 RDI: ffff9686cdc03a40
[ 744.556483] RBP: ffff9686c9703f20 R08: ffff9686e245c2a0 R09: ffff9686cdc03a40
[ 744.558228] R10: ffff9686a42e07a0 R11: 0000000000000202 R12: 00000000006021d0
[ 744.559990] R13: 00007ffe1fdb13c0 R14: 0000000000000000 R15: 0000000000000000
[ 744.561797] FS: 00007f2d7a5a1700(0000) GS:ffff9686e2440000(0000) knlGS:0000000000000000
[ 744.563601] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 744.565399] CR2: 00000000006021d0 CR3: 00000004e52cd000 CR4: 00000000003406e0
[ 744.567179] Stack:
[ 744.568948] 00000000006021d0 0000000000400960 ffff9686c9703f38 ffffffff8e8a76c2
[ 744.570743] 0000000000000000 ffff9686c9703f48 ffffffff8e8a7829 00007ffe1fdb12d0
[ 744.572512] ffffffff8f0a1476 0000000000000000 0000000000000000 00007ffe1fdb13c0
[ 744.574295] Call Trace:
[ 744.576072] [<ffffffff8e8a76c2>] make_snapshot+0x12/0x40
[ 744.577868] [<ffffffff8e8a7829>] SyS_snapshot+0x39/0x50
[ 744.579657] [<ffffffff8f0a1476>] entry_SYSCALL_64_fastpath+0x1e/0xa8
[ 744.581429] Code: 89 10 5b 41 5c 5d c3 48 8b 3d ca 66 27 01 ba 18 00 00 00 be 20 00 08 02 e8 a3 e4 15 00 48 8b 93 c0 07 00 00 48 89 82 b8 07 00 00 <49> 8b 14 24 48 89 10 5b 41 5c 5d c3 66 0f 1f 84 00 00 00 00 00
[ 744.583346] RIP [<ffffffff8e8a763b>] reserve_context+0x5b/0x70
[ 744.585187] RSP <ffff9686c9703f10>
[ 744.586970] CR2: 00000000006021d0
[ 744.588705] ---[ end trace 85b6d48056c107e0 ]---
Any ideas what I can try to fix it?
The kernel was attempting to address: 0x00000000006021d0 but the system wouldn't allow it. As I understand unable to handle paging request means there's an invalid pointer in the code. Any tips on what setup this project was ran and tested or what could be the issue, would be great.
Seems the bug is here (your additions in kernel):
https://github.com/sslab-gatech/perf-fuzz/blob/796185d2dfbcaeeb53273d159b3f745d861cdb23/linux-4.8.10/kernel/snapshot.c#L547
Actually managed to get it to work on another laptop.
On Intel laptop with 19 GB ram it causes the error above (also the Filesystem is encrypted, not sure if this could be the culprit )
On AMD one with 8 GB, works.
Have 3x (300%) speed increase vs afl-persistent mode. Nice!