angeloc / i2c-bus-pirate

Linux kernel module for Bus Pirate as I2C bus adapter
5 stars 0 forks source link

Kernel Panic #1

Open btashton opened 3 years ago

btashton commented 3 years ago

I just tried to use this on my system and got this kernel panic soon as I issued the inputattach

❯ uname -a
Linux science.local 5.8.9-200.fc32.x86_64 #1 SMP Mon Sep 14 18:28:45 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
[670835.566878] i2c_bus_pirate: loading out-of-tree module taints kernel.
[670835.566911] i2c_bus_pirate: module verification failed: signature and/or required key missing - tainting kernel
[670948.740118] serio: Serial port ttyUSB0
[670948.740153] BUG: kernel NULL pointer dereference, address: 0000000000000410
[670948.740155] #PF: supervisor write access in kernel mode
[670948.740155] #PF: error_code(0x0002) - not-present page
[670948.740156] PGD 80000008395ca067 P4D 80000008395ca067 PUD 3a94ec067 PMD 0 
[670948.740158] Oops: 0002 [#1] SMP PTI
[670948.740160] CPU: 1 PID: 1586007 Comm: kworker/1:0 Tainted: G           OE     5.8.9-200.fc32.x86_64 #1
[670948.740161] Hardware name: Intel(R) Client Systems NUC8i7BEH/NUC8BEB, BIOS BECFL357.86A.0077.2019.1127.1452 11/27/2019
[670948.740163] Workqueue: events_long serio_handle_event
[670948.740165] RIP: 0010:buspirate_connect+0xc1/0x390 [i2c_bus_pirate]
[670948.740166] Code: 10 e0 32 62 c1 4d 89 66 18 4d 89 be b0 00 00 00 49 c7 86 38 03 00 00 f0 50 62 c1 49 89 b6 6c 03 00 00 41 c6 86 7e 03 00 00 00 <c7> 80 10 04 00 00 00 00 00 00 49 8b 84 24 d8 00 00 00 48 85 c0 74
[670948.740167] RSP: 0018:ffffb3c303523ca8 EFLAGS: 00010246
[670948.740168] RAX: 0000000000000000 RBX: 000000000000000a RCX: 0000000000000000
[670948.740169] RDX: 0000000000000001 RSI: 6172695020737542 RDI: 0000000000000282
[670948.740169] RBP: ffffffffc1625000 R08: ffff991b49a6cc08 R09: ffff991b49a6cc08
[670948.740170] R10: ffff991b9a806a00 R11: 0000000000000000 R12: ffff991b49a6c800
[670948.740170] R13: ffff991b49a6c800 R14: ffff991b49a69028 R15: ffff991b49a6c958
[670948.740171] FS:  0000000000000000(0000) GS:ffff991b9dc40000(0000) knlGS:0000000000000000
[670948.740172] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[670948.740172] CR2: 0000000000000410 CR3: 000000048827c001 CR4: 00000000003606e0
[670948.740173] Call Trace:
[670948.740176]  ? kernfs_create_link+0x5d/0xa0
[670948.740177]  ? serio_driver_probe+0x33/0x50
[670948.740180]  ? really_probe+0x160/0x400
[670948.740181]  ? driver_probe_device+0xe1/0x150
[670948.740182]  ? driver_allows_async_probing+0x50/0x50
[670948.740183]  ? bus_for_each_drv+0x6a/0xa0
[670948.740184]  ? __device_attach+0xb4/0x1b0
[670948.740186]  ? bus_probe_device+0x8e/0xa0
[670948.740187]  ? device_add+0x389/0x800
[670948.740188]  ? serio_handle_event+0x285/0x2d3
[670948.740190]  ? process_one_work+0x1b4/0x370
[670948.740191]  ? worker_thread+0x53/0x3e0
[670948.740192]  ? process_one_work+0x370/0x370
[670948.740193]  ? kthread+0x119/0x140
[670948.740194]  ? __kthread_bind_mask+0x60/0x60
[670948.740196]  ? ret_from_fork+0x22/0x30
[670948.740197] Modules linked in: i2c_bus_pirate(OE) cp210x nfnetlink_queue nfnetlink_log cdc_acm uas usb_storage ftdi_sio xt_state xt_conntrack xt_MASQUERADE snd_usb_audio snd_usbmidi_lib snd_rawmidi uvcvideo gspca_vc032x gspca_main videobuf2_vmalloc videobuf2_memops videobuf2_v4l2 videobuf2_common videodev mc nft_objref nf_conntrack_netbios_ns nf_conntrack_broadcast nft_fib_inet nft_fib_ipv4 nft_fib_ipv6 nft_fib nft_reject_inet nf_reject_ipv4 nf_reject_ipv6 nft_reject nft_ct nft_chain_nat nf_tables ebtable_nat ebtable_broute ip6table_nat ip6table_mangle ip6table_raw ip6table_security iptable_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 iptable_mangle iptable_raw iptable_security ebtable_filter ebtables ip6table_filter ip6_tables iptable_filter ip_tables uinput rfcomm tun bridge stp llc ccm ip_set nfnetlink cmac bnep sunrpc vfat fat squashfs loop snd_sof_pci snd_sof_intel_byt snd_sof_intel_ipc snd_sof_intel_hda_common snd_soc_hdac_hda snd_sof_xtensa_dsp snd_sof_intel_hda snd_sof
[670948.740212]  snd_hda_codec_hdmi intel_rapl_msr intel_rapl_common snd_soc_skl snd_soc_sst_ipc snd_soc_sst_dsp snd_hda_codec_realtek snd_hda_ext_core snd_soc_acpi_intel_match snd_soc_acpi snd_hda_codec_generic ledtrig_audio snd_soc_core snd_compress ac97_bus snd_pcm_dmaengine snd_hda_intel x86_pkg_temp_thermal snd_intel_dspcfg intel_powerclamp snd_hda_codec coretemp iwlmvm kvm_intel ee1004 snd_hda_core iTCO_wdt kvm snd_hwdep intel_pmc_bxt mei_hdcp mac80211 iTCO_vendor_support btusb btrtl irqbypass btbcm libarc4 snd_seq btintel rapl intel_cstate snd_seq_device iwlwifi bluetooth snd_pcm intel_uncore joydev snd_timer ecdh_generic pcspkr cfg80211 snd i2c_i801 ecc intel_wmi_thunderbolt wmi_bmof soundcore i2c_smbus mei_me mei rfkill intel_pch_thermal acpi_tad acpi_pad hid_logitech_hidpp hid_logitech_dj i915 rtsx_pci_sdmmc mmc_core i2c_algo_bit drm_kms_helper crct10dif_pclmul crc32_pclmul crc32c_intel cec ghash_clmulni_intel drm e1000e rtsx_pci wmi video pinctrl_cannonlake pinctrl_intel fuse
[670948.740232]  [last unloaded: ip_tables]
[670948.740235] CR2: 0000000000000410
[670948.740236] ---[ end trace 05c77edfc6ea1d1a ]---
[670948.740237] RIP: 0010:buspirate_connect+0xc1/0x390 [i2c_bus_pirate]
[670948.740238] Code: 10 e0 32 62 c1 4d 89 66 18 4d 89 be b0 00 00 00 49 c7 86 38 03 00 00 f0 50 62 c1 49 89 b6 6c 03 00 00 41 c6 86 7e 03 00 00 00 <c7> 80 10 04 00 00 00 00 00 00 49 8b 84 24 d8 00 00 00 48 85 c0 74
[670948.740239] RSP: 0018:ffffb3c303523ca8 EFLAGS: 00010246
[670948.740239] RAX: 0000000000000000 RBX: 000000000000000a RCX: 0000000000000000
[670948.740240] RDX: 0000000000000001 RSI: 6172695020737542 RDI: 0000000000000282
[670948.740241] RBP: ffffffffc1625000 R08: ffff991b49a6cc08 R09: ffff991b49a6cc08
[670948.740241] R10: ffff991b9a806a00 R11: 0000000000000000 R12: ffff991b49a6c800
[670948.740242] R13: ffff991b49a6c800 R14: ffff991b49a69028 R15: ffff991b49a6c958
[670948.740242] FS:  0000000000000000(0000) GS:ffff991b9dc40000(0000) knlGS:0000000000000000
[670948.740243] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[670948.740244] CR2: 0000000000000410 CR3: 000000048827c001 CR4: 00000000003606e0
angeloc commented 3 years ago

Never tried this driver on 5.8, I can have a look btw.

Are you using the patched inputattach?

btashton commented 3 years ago

I used the latest from your linked repository