RedPill-TTG / redpill-lkm

Linux kernel module for RedPill
GNU General Public License v3.0
307 stars 174 forks source link

Mocking auto-power SET on RTC #17

Closed tossp closed 2 years ago

tossp commented 2 years ago

The kernel keeps reporting this information. What action should I take?

[80085.526427] <redpill/rtc_proxy.c:226> Mocking auto-power SET on RTC
[80085.532878] BUG: unable to handle kernel NULL pointer dereference at           (null)
[80085.540936] IP: [<ffffffff812fd1e6>] memcpy_erms+0x6/0x10
[80085.546473] PGD 363fb9067 PUD 3d1d07067 PMD 0
[80085.551076] Oops: 0000 [#713] SMP
[80085.554569] Modules linked in: fuse nfnetlink pci_stub vfio_pci vfio_virqfd vfio_iommu_type1 vfio vhost_net(O) kvm_intel kvm irqbypass xt_ipvs ip_vs_rr ip_vs xt_mark br_netfilter bridge stp aufs macvlan veth xt_addrtype tun cmac ctr ccm ipt_MASQUERADE xt_REDIRECT nf_nat_masquerade_ipv4 xt_nat nf_nat_redirect xt_policy xfrm6_mode_transport xfrm4_mode_transport xfrm6_mode_tunnel xfrm4_mode_tunnel xfrm6_mode_beet xfrm4_mode_beet deflate authencesn ipcomp6 ipcomp xfrm6_tunnel xfrm4_tunnel tunnel6 esp6 esp4 ah6 ah4 xfrm_ipcomp af_key xfrm_user xfrm_algo l2tp_ppp l2tp_core ppp_deflate bsd_comp ppp_mppe echainiv xt_TCPMSS iptable_mangle pppox ppp_async ppp_generic slhc 8021q vhost_scsi(O) vhost(O) tcm_loop(O) iscsi_target_mod(O) target_core_user(O) target_core_ep(O) target_core_multi_file(O) target_core_file(O)
[80085.628492]  target_core_iblock(O) target_core_mod(O) syno_extent_pool(PO) rodsp_ep(O) udf isofs loop nfsv3 nfs quota_v2 quota_tree synoacl_vfs(PO) iptable_nat nf_nat_ipv4 nf_nat raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx xt_conntrack xt_mac xt_geoip(O) compat_xtables(O) nf_conntrack_ipv6 ip6table_filter ip6_tables xt_recent xt_iprange xt_limit xt_state xt_tcpudp xt_multiport xt_LOG nf_conntrack_ipv4 nf_defrag_ipv4 iptable_filter ip_tables x_tables nfsd btrfs ecryptfs zstd_decompress zstd_compress xxhash xor raid6_pq lockd grace rpcsec_gss_krb5 auth_rpcgss sunrpc aesni_intel glue_helper lrw gf128mul ablk_helper apollolake_synobios(PO) hid_generic usbhid hid usblp i915 drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops cfbfillrect cfbcopyarea cfbimgblt drm drm_panel_orientation_quirks
[80085.702288]  iosf_mbi fb fbdev video backlight button uhci_hcd ehci_pci ehci_hcd r8168(O) i2c_algo_bit openvswitch gre nf_defrag_ipv6 nf_conntrack igb(O) e1000e(O) sg dm_snapshot dm_bufio crc_itu_t crc_ccitt psnap p8022 llc hfsplus md4 hmac sit tunnel4 ipv6 flashcache_syno(O) flashcache(O) syno_flashcache_control(O) dm_mod arc4 crc32c_intel cryptd sha256_generic ecb aes_x86_64 authenc des_generic ansi_cprng cts md5 cbc cpufreq_powersave cpufreq_performance acpi_cpufreq processor cpufreq_stats vxlan ip6_udp_tunnel udp_tunnel zram ip_tunnel etxhci_hcd usb_storage xhci_pci xhci_hcd usbcore usb_common redpill(OE) [last unloaded: apollolake_synobios]
[80085.760520] CPU: 3 PID: 4856 Comm: scemd Tainted: P      D    OE   4.4.180+ #42214
[80085.768258] Hardware name: System manufacturer System Product Name/B150M-PLUS, BIOS 3806 05/18/2018
[80085.777496] task: ffff88004055d280 ti: ffff88012a65c000 task.ti: ffff88012a65c000
[80085.785166] RIP: 0010:[<ffffffff812fd1e6>]  [<ffffffff812fd1e6>] memcpy_erms+0x6/0x10
[80085.793225] RSP: 0018:ffff88012a65fbb0  EFLAGS: 00010246
[80085.798660] RAX: ffff88012a65fbf0 RBX: ffffffffffffffff RCX: 0000000000000134
[80085.805956] RDX: 0000000000000134 RSI: 0000000000000000 RDI: ffff88012a65fbf0
[80085.813252] RBP: ffff88012a65fbc0 R08: 000000000000000a R09: 00000000000085d6
[80085.820550] R10: 0000000000000005 R11: ffffffff819fe16d R12: ffff88012a65fbf0
[80085.827831] R13: ffff8800abd51a40 R14: ffff88042027c048 R15: ffff8800abd51a40
[80085.835135] FS:  00007f5fe7413700(0000) GS:ffff880433d80000(0000) knlGS:0000000000000000
[80085.843377] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[80085.849279] CR2: 0000000000000000 CR3: 0000000104946000 CR4: 00000000003606f0
[80085.856569] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[80085.863891] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[80085.871196] Stack:
[80085.873241]  ffffffffa000875c 00007f5fe7412320 ffff88012a65fe88 ffffffffa06a452c
[80085.880894]  ffff88012a65fc68 ffff88012a65fc60 ffff88012a65fcf0 0000000000000001
[80085.888512]  0000000100000001 00000000007f1700 0000000000000000 0000000000000000
[80085.896131] Call Trace:
[80085.898639]  [<ffffffffa000875c>] ? rtc_proxy_set_auto_power_on+0x70/0x76 [redpill]
[80085.906437]  [<ffffffffa06a452c>] synobios_ioctl+0x54c/0x1e50 [apollolake_synobios]
[80085.914252]  [<ffffffff81131bd9>] ? unlock_page+0x59/0x60
[80085.919748]  [<ffffffff8115e837>] ? do_wp_page+0x287/0x650
[80085.925356]  [<ffffffff8121ecf9>] ? ext4_getattr+0x19/0x90
[80085.930980]  [<ffffffff81194a20>] ? cp_new_stat+0x110/0x120
[80085.936674]  [<ffffffff811a70d2>] do_vfs_ioctl+0x4d2/0x960
[80085.942248]  [<ffffffff811a7601>] SyS_ioctl+0xa1/0xb0
[80085.947395]  [<ffffffff81579c4a>] entry_SYSCALL_64_fastpath+0x1e/0x8e
[80085.953945] Code: 90 90 90 90 90 eb 1e 0f 1f 00 48 89 f8 48 89 d1 48 c1 e9 03 83 e2 07 f3 48 a5 89 d1 f3 a4 c3 66 0f 1f 44 00 00 48 89 f8 48 89 d1 <f3> a4 c3 0f 1f 80 00 00 00 00 48 89 f8 48 83 fa 20 72 7e 40 38
[80085.974293] RIP  [<ffffffff812fd1e6>] memcpy_erms+0x6/0x10
[80085.979909]  RSP <ffff88012a65fbb0>
[80085.983480] CR2: 0000000000000000
[80085.986852] ---[ end trace 487f34b257519703 ]---
ttg-public commented 2 years ago

Can you check the newest version? We think that https://github.com/RedPill-TTG/redpill-lkm/commit/29637db757d8ad0240e161136db814d5bfd31c33 should fix this problem.

tossp commented 2 years ago

compilation 021ed51 Is there a problem with my write boot method? I use dd if=$(ls -lt /volume1/homes/zh/app/redpill-tool-chain/images/redpill-* | awk 'NR==1{print $9}') of=/dev/synoboot bs=4M;sync to write the command to boot the USB flash disk

Now it's replaced by a large number of newspapers

[12359.431978] <redpill/smart_shim.c:794> Handling ioctl(0x2285) for /dev/sdf
[12359.431978] <redpill/smart_shim.c:809> sd_ioctl(0x2285) - not a hooked ioctl, noop
[12359.507578] <redpill/smart_shim.c:809> sd_ioctl(0x2285) - not a hooked ioctl, noop
[12360.565689] <redpill/smart_shim.c:794> Handling ioctl(0x2285) for /dev/sda
[12360.572769] <redpill/smart_shim.c:809> sd_ioctl(0x2285) - not a hooked ioctl, noop
[12360.582372] <redpill/smart_shim.c:794> Handling ioctl(0x2285) for /dev/sdb
[12360.589546] <redpill/smart_shim.c:809> sd_ioctl(0x2285) - not a hooked ioctl, noop
[12360.599694] <redpill/smart_shim.c:794> Handling ioctl(0x2285) for /dev/sdc
[12360.606834] <redpill/smart_shim.c:809> sd_ioctl(0x2285) - not a hooked ioctl, noop
[12360.617980] <redpill/smart_shim.c:794> Handling ioctl(0x2285) for /dev/sdd
[12360.625156] <redpill/smart_shim.c:809> sd_ioctl(0x2285) - not a hooked ioctl, noop
[12360.659361] <redpill/smart_shim.c:794> Handling ioctl(0x2285) for /dev/sde
[12360.666479] <redpill/smart_shim.c:809> sd_ioctl(0x2285) - not a hooked ioctl, noop
[12360.676161] <redpill/smart_shim.c:794> Handling ioctl(0x2285) for /dev/sdf
[12360.683266] <redpill/smart_shim.c:809> sd_ioctl(0x2285) - not a hooked ioctl, noop
[12362.589846] <redpill/smart_shim.c:794> Handling ioctl(0x2285) for /dev/sda
[12362.596935] <redpill/smart_shim.c:809> sd_ioctl(0x2285) - not a hooked ioctl, noop
[12368.650325] <redpill/smart_shim.c:794> Handling ioctl(0x2285) for /dev/sdb
[12368.657329] <redpill/smart_shim.c:809> sd_ioctl(0x2285) - not a hooked ioctl, noop
[12368.667003] <redpill/smart_shim.c:794> Handling ioctl(0x2285) for /dev/sdc
[12368.674010] <redpill/smart_shim.c:809> sd_ioctl(0x2285) - not a hooked ioctl, noop
[12368.683744] <redpill/smart_shim.c:794> Handling ioctl(0x2285) for /dev/sdd
[12368.690851] <redpill/smart_shim.c:809> sd_ioctl(0x2285) - not a hooked ioctl, noop
[12368.741601] <redpill/smart_shim.c:794> Handling ioctl(0x2285) for /dev/sde
[12368.748674] <redpill/smart_shim.c:809> sd_ioctl(0x2285) - not a hooked ioctl, noop
[12368.758453] <redpill/smart_shim.c:794> Handling ioctl(0x2285) for /dev/sdf
[12368.765542] <redpill/smart_shim.c:809> sd_ioctl(0x2285) - not a hooked ioctl, noop
[12382.883491] <redpill/smart_shim.c:794> Handling ioctl(0x2285) for /dev/sda
[12382.890572] <redpill/smart_shim.c:809> sd_ioctl(0x2285) - not a hooked ioctl, noop
[12382.900053] <redpill/smart_shim.c:794> Handling ioctl(0x2285) for /dev/sdb
[12382.907140] <redpill/smart_shim.c:809> sd_ioctl(0x2285) - not a hooked ioctl, noop
[12382.916673] <redpill/smart_shim.c:794> Handling ioctl(0x2285) for /dev/sdc
[12382.923770] <redpill/smart_shim.c:809> sd_ioctl(0x2285) - not a hooked ioctl, noop
[12382.972205] <redpill/smart_shim.c:794> Handling ioctl(0x2285) for /dev/sdd
[12382.979347] <redpill/smart_shim.c:809> sd_ioctl(0x2285) - not a hooked ioctl, noop
[12383.028275] <redpill/smart_shim.c:794> Handling ioctl(0x2285) for /dev/sde
[12383.035330] <redpill/smart_shim.c:809> sd_ioctl(0x2285) - not a hooked ioctl, noop
[12383.046203] <redpill/smart_shim.c:794> Handling ioctl(0x2285) for /dev/sdf
[12383.053291] <redpill/smart_shim.c:809> sd_ioctl(0x2285) - not a hooked ioctl, noop
[12387.126154] <redpill/smart_shim.c:794> Handling ioctl(0x2285) for /dev/sda
[12387.133194] <redpill/smart_shim.c:809> sd_ioctl(0x2285) - not a hooked ioctl, noop
[12393.198051] <redpill/smart_shim.c:794> Handling ioctl(0x2285) for /dev/sdb
[12393.205260] <redpill/smart_shim.c:809> sd_ioctl(0x2285) - not a hooked ioctl, noop
[12393.215068] <redpill/smart_shim.c:794> Handling ioctl(0x2285) for /dev/sdc
[12393.222160] <redpill/smart_shim.c:809> sd_ioctl(0x2285) - not a hooked ioctl, noop
[12393.255831] <redpill/smart_shim.c:794> Handling ioctl(0x2285) for /dev/sdd
[12393.263058] <redpill/smart_shim.c:809> sd_ioctl(0x2285) - not a hooked ioctl, noop
[12393.273241] <redpill/smart_shim.c:794> Handling ioctl(0x2285) for /dev/sde
[12393.280384] <redpill/smart_shim.c:809> sd_ioctl(0x2285) - not a hooked ioctl, noop
[12393.342023] <redpill/smart_shim.c:794> Handling ioctl(0x2285) for /dev/sdf
[12393.349112] <redpill/smart_shim.c:809> sd_ioctl(0x2285) - not a hooked ioctl, noop
[12405.284131] <redpill/smart_shim.c:794> Handling ioctl(0x2285) for /dev/sda
[12405.291165] <redpill/smart_shim.c:809> sd_ioctl(0x2285) - not a hooked ioctl, noop
[12405.307606] <redpill/smart_shim.c:794> Handling ioctl(0x2285) for /dev/sdb
[12405.314639] <redpill/smart_shim.c:809> sd_ioctl(0x2285) - not a hooked ioctl, noop
[12405.324361] <redpill/smart_shim.c:794> Handling ioctl(0x2285) for /dev/sdc
[12405.331464] <redpill/smart_shim.c:809> sd_ioctl(0x2285) - not a hooked ioctl, noop
[12405.565772] <redpill/smart_shim.c:794> Handling ioctl(0x2285) for /dev/sdd
[12405.572765] <redpill/smart_shim.c:809> sd_ioctl(0x2285) - not a hooked ioctl, noop
[12405.584077] <redpill/smart_shim.c:794> Handling ioctl(0x2285) for /dev/sde
[12405.591141] <redpill/smart_shim.c:809> sd_ioctl(0x2285) - not a hooked ioctl, noop
[12405.601129] <redpill/smart_shim.c:794> Handling ioctl(0x2285) for /dev/sdf
[12405.608125] <redpill/smart_shim.c:809> sd_ioctl(0x2285) - not a hooked ioctl, noop
[12411.643179] <redpill/smart_shim.c:794> Handling ioctl(0x2285) for /dev/sda
[12411.650447] <redpill/smart_shim.c:809> sd_ioctl(0x2285) - not a hooked ioctl, noop
[12416.144124] <redpill/smart_shim.c:794> Handling ioctl(0x128b) for /dev/sdq
[12416.151244] <redpill/smart_shim.c:809> sd_ioctl(0x128b) - not a hooked ioctl, noop
[12416.159771] <redpill/smart_shim.c:794> Handling ioctl(0x128b) for /dev/sdq
[12416.166877] <redpill/smart_shim.c:809> sd_ioctl(0x128b) - not a hooked ioctl, noop
[12416.711021] <redpill/smart_shim.c:794> Handling ioctl(0x5331) for /dev/sdq
[12416.718244] <redpill/smart_shim.c:809> sd_ioctl(0x5331) - not a hooked ioctl, noop
[12417.980555] <redpill/smart_shim.c:794> Handling ioctl(0x2285) for /dev/sdb
[12417.987677] <redpill/smart_shim.c:809> sd_ioctl(0x2285) - not a hooked ioctl, noop
[12417.997371] <redpill/smart_shim.c:794> Handling ioctl(0x2285) for /dev/sdc
[12418.004463] <redpill/smart_shim.c:809> sd_ioctl(0x2285) - not a hooked ioctl, noop
[12418.014422] <redpill/smart_shim.c:794> Handling ioctl(0x2285) for /dev/sdd
[12418.021571] <redpill/smart_shim.c:809> sd_ioctl(0x2285) - not a hooked ioctl, noop
[12418.065313] <redpill/smart_shim.c:794> Handling ioctl(0x2285) for /dev/sde
[12418.072437] <redpill/smart_shim.c:809> sd_ioctl(0x2285) - not a hooked ioctl, noop
[12418.082570] <redpill/smart_shim.c:794> Handling ioctl(0x2285) for /dev/sdf
[12418.089652] <redpill/smart_shim.c:809> sd_ioctl(0x2285) - not a hooked ioctl, noop
[12419.433579] <redpill/smart_shim.c:794> Handling ioctl(0x2285) for /dev/sda
[12419.434484] <redpill/smart_shim.c:794> Handling ioctl(0x2285) for /dev/sdb
[12419.434485] <redpill/smart_shim.c:809> sd_ioctl(0x2285) - not a hooked ioctl, noop
[12419.435623] <redpill/smart_shim.c:794> Handling ioctl(0x2285) for /dev/sdc
[12419.435623] <redpill/smart_shim.c:809> sd_ioctl(0x2285) - not a hooked ioctl, noop
[12419.436542] <redpill/smart_shim.c:794> Handling ioctl(0x2285) for /dev/sdd
[12419.436542] <redpill/smart_shim.c:809> sd_ioctl(0x2285) - not a hooked ioctl, noop
[12419.437649] <redpill/smart_shim.c:794> Handling ioctl(0x2285) for /dev/sde
[12419.437650] <redpill/smart_shim.c:809> sd_ioctl(0x2285) - not a hooked ioctl, noop
[12419.438441] <redpill/smart_shim.c:794> Handling ioctl(0x2285) for /dev/sdf
[12419.438442] <redpill/smart_shim.c:809> sd_ioctl(0x2285) - not a hooked ioctl, noop
[12419.515366] <redpill/smart_shim.c:809> sd_ioctl(0x2285) - not a hooked ioctl, noop
[12426.026329] <redpill/smart_shim.c:794> Handling ioctl(0x2285) for /dev/sda
[12426.033423] <redpill/smart_shim.c:809> sd_ioctl(0x2285) - not a hooked ioctl, noop
[12426.042834] <redpill/smart_shim.c:794> Handling ioctl(0x2285) for /dev/sdb
[12426.049915] <redpill/smart_shim.c:809> sd_ioctl(0x2285) - not a hooked ioctl, noop
[12426.059930] <redpill/smart_shim.c:794> Handling ioctl(0x2285) for /dev/sdc
[12426.067078] <redpill/smart_shim.c:809> sd_ioctl(0x2285) - not a hooked ioctl, noop
[12426.140764] <redpill/smart_shim.c:794> Handling ioctl(0x2285) for /dev/sdd
[12426.147784] <redpill/smart_shim.c:809> sd_ioctl(0x2285) - not a hooked ioctl, noop
[12426.166451] <redpill/smart_shim.c:794> Handling ioctl(0x2285) for /dev/sde
[12426.173471] <redpill/smart_shim.c:809> sd_ioctl(0x2285) - not a hooked ioctl, noop
[12426.199785] <redpill/smart_shim.c:794> Handling ioctl(0x2285) for /dev/sdf
[12426.206854] <redpill/smart_shim.c:809> sd_ioctl(0x2285) - not a hooked ioctl, noop
[12434.469356] <redpill/smart_shim.c:794> Handling ioctl(0x2285) for /dev/sda
[12434.476412] <redpill/smart_shim.c:809> sd_ioctl(0x2285) - not a hooked ioctl, noop
ttg-public commented 2 years ago

That is actually normal - it simply logs every ioctl to a drive the DSM makes (and it "pings" all disks every few seconds). We will disable that log by default. As long as the RTC issue is gone it's all good :)

Feel free to reopen the issue if you get the RTC crash again.