Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1E5D0C38142 for ; Sat, 28 Jan 2023 19:35:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234384AbjA1TfI (ORCPT ); Sat, 28 Jan 2023 14:35:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41506 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229966AbjA1TfE (ORCPT ); Sat, 28 Jan 2023 14:35:04 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F30D524C8F for ; Sat, 28 Jan 2023 11:35:02 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 7F96760B50 for ; Sat, 28 Jan 2023 19:35:02 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 90091C433EF; Sat, 28 Jan 2023 19:35:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1674934501; bh=bai98EDzjlJ3IhFmE1MpmIMJqor8WkhiAmCrtGJGgAE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=eQvR4Dw76THNoj0vkYmTRy3d4pS9jpEV1AX4gtes2PdZgYoZgkCU+bneedZQChnWy 6YK9lOVA7rxogC8nm0sdRkthcXrkeeMKWZyQ/Uzg7RX0mWDo3uPYO6TNOd+nHpwsHq jq5z8DU0n0s0T223G+ZR0Bg5uO8WSotLhyfQSj0/wWTGjEmZPJwKgHgJfwDEqe/hSS mqRJcUDhsYqKx9796gjZ91xs2C1m5DydeBN34j8D656Pwn0Guj6KHkwcEp4yS3az+k Whh1fB/RJALUTNroYRhqWTLWqHMOZS02ut3AF7kqZJLmPn+7vf7CtRnO4Do6C+8coS ZwGpzX3HuoN7w== Received: by pali.im (Postfix) id 8DAC7709; Sat, 28 Jan 2023 20:34:58 +0100 (CET) Date: Sat, 28 Jan 2023 20:34:58 +0100 From: Pali =?utf-8?B?Um9ow6Fy?= To: Jens Axboe Cc: Linus Torvalds , Christoph Hellwig , Greg Kroah-Hartman , Linux Kernel Mailing List Subject: pktcdvd Message-ID: <20230128193458.ukl35ev4mwbjmu6b@pali> References: <90eb90da-2679-cac0-979d-6ba0cc8ccbb8@kernel.dk> <20230105174210.jbjoqelllcrd57q6@pali> <58d3649f-3c8c-8b12-1930-f06f59837ad5@kernel.dk> <1933bddd-42d7-d92b-974f-f26c46c01547@kernel.dk> <182bc0ee-51e3-b8c4-59f7-dcf702865a95@kernel.dk> <20230106165809.vkz7lr7gi3xce22e@pali> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: User-Agent: NeoMutt/20180716 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Friday 06 January 2023 10:04:47 Jens Axboe wrote: > On 1/6/23 9:58?AM, Pali Roh?r wrote: > > On Thursday 05 January 2023 13:33:11 Jens Axboe wrote: > >> On 1/5/23 1:03?PM, Linus Torvalds wrote: > >>> So nobody is going to be motivated to do any development in this area, > >>> and the best we can do is probably to just keep it limping along. > >> > >> Indeed... > > ... > >>> There's probably other cruft in pktcdvd that could be removed without > >>> removing the whole driver, but I do get the feeling that it's just > >>> less pain to keep the status quo, and that there isn't really much > >>> motivation for anybody to do anything else. > >> > >> I'm reluctant to touch it outside of changes that are driven by core > >> changes, and of course the motivation to remove it was driven by not > >> wanting to do that either. Any kind of re-architecting of how it works= I > >> would not advocate for. It supposedly works well enough that none of t= he > >> (few) users are reporting issues with it, best to just let it remain > >> like that imho. > >=20 > > Yea, I agree. This code is in state when it is _used_ and not developed > > anymore. Nobody is really motivated to re-architecture or rewrite this > > code. Such work has big probability to break something which currently > > works fine. And because lot of users are on stable/LTS kernel versions, > > it is possible that we would not notice breakage earlier than (lets say) > > in 5 years. >=20 > I did sent out the revert this morning, would be great if you can test > 6.2-rc3 when it is out. I'm a bit skeptical on the whole devnode front, > and suspect we might need to convert that to disk_name manipulation. > Which would be fine, as we can then drop the devnode reinstate revert as > well going forward. But I need to find a bit of time to look closer at > this part. Hello! Sorry for a longer delay. Now I have started testing it with Linux 6.2.0-rc5. Adding mapping works fine. Reading also works. Mounting filesystem also works, reading mounted fs also. But after writing some data to fs and calling sync cause kernel oops. Below is the dmesg log. "sync" freezes and never finish. [ 1284.701497] pktcdvd: pktcdvd0: writer mapped to sr0 [ 1321.432589] pktcdvd: pktcdvd0: Fixed packets, 32 blocks, Mode-2 disc [ 1321.437543] pktcdvd: pktcdvd0: maximum media speed: 10 [ 1321.437546] pktcdvd: pktcdvd0: write speed 10x [ 1327.098955] pktcdvd: pktcdvd0: 590528kB available on disc [ 1329.737263] UDF-fs: INFO Mounting volume 'LinuxUDF', timestamp 2023/01/2= 8 19:16 (103c) [ 1435.627449] ------------[ cut here ]------------ [ 1435.627466] kernel BUG at drivers/block/pktcdvd.c:2434! [ 1435.627472] invalid opcode: 0000 [#1] PREEMPT SMP PTI [ 1435.627476] CPU: 3 PID: 9 Comm: kworker/u8:0 Tainted: G S U = 6.2.0-rc5 #4 [ 1435.627478] Hardware name: Dell Inc. Latitude E6440/02P3T1, BIOS A05 02/= 18/2014 [ 1435.627480] Workqueue: writeback wb_workfn (flush-253:0) [ 1435.627487] RIP: 0010:pkt_submit_bio+0x398/0x430 [pktcdvd] [ 1435.627494] Code: 55 28 41 89 55 28 41 3b 55 40 7c 07 41 83 7d 44 01 74 = 7c 4c 89 f7 e8 97 32 e1 e9 48 8b 7c 24 10 e8 8d 32 e1 e9 e9 e6 fe ff ff <0f= > 0b 0f 0b 49 8b 3f 48 c7 c1 a0 97 d0 c0 ba 00 0c 00 00 48 89 c6 [ 1435.627496] RSP: 0018:ffffb6a10007b828 EFLAGS: 00010283 [ 1435.627498] RAX: 0000000000000080 RBX: ffff8a4757170800 RCX: 00000000000= 01800 [ 1435.627500] RDX: 0000000000001604 RSI: 0000000000001680 RDI: 00000000000= 01603 [ 1435.627501] RBP: ffff8a4750a37480 R08: 0000000000000200 R09: fffffffffff= fff80 [ 1435.627502] R10: 0000000000000400 R11: 0000000000000040 R12: ffff8a4721b= d0dc0 [ 1435.627504] R13: 0000000000001000 R14: 0000000000000000 R15: ffff8a4739e= 56000 [ 1435.627505] FS: 0000000000000000(0000) GS:ffff8a4826b80000(0000) knlGS:= 0000000000000000 [ 1435.627507] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 1435.627508] CR2: 0000560a548f8490 CR3: 0000000067210005 CR4: 00000000001= 706e0 [ 1435.627510] Call Trace: [ 1435.627512] [ 1435.627514] ? __mod_memcg_lruvec_state+0x72/0xd0 [ 1435.627519] ? __mod_lruvec_page_state+0x93/0x130 [ 1435.627523] __submit_bio+0x89/0x130 [ 1435.627528] submit_bio_noacct_nocheck+0xe5/0x2b0 [ 1435.627532] __mpage_writepage+0x6f9/0x860 [ 1435.627536] ? __mod_memcg_lruvec_state+0x72/0xd0 [ 1435.627539] ? folio_clear_dirty_for_io+0x13c/0x190 [ 1435.627542] write_cache_pages+0x18a/0x4d0 [ 1435.627555] ? __pfx___mpage_writepage+0x10/0x10 [ 1435.627558] mpage_writepages+0x56/0xb0 [ 1435.627561] ? __pfx_udf_get_block+0x10/0x10 [udf] [ 1435.627571] do_writepages+0xd5/0x1b0 [ 1435.627573] ? __wb_calc_thresh+0x3a/0x120 [ 1435.627576] __writeback_single_inode+0x41/0x360 [ 1435.627579] writeback_sb_inodes+0x1f0/0x460 [ 1435.627583] __writeback_inodes_wb+0x5f/0xd0 [ 1435.627586] wb_writeback+0x235/0x2d0 [ 1435.627589] wb_workfn+0x311/0x480 [ 1435.627592] ? _raw_spin_unlock+0x15/0x30 [ 1435.627595] ? finish_task_switch+0x91/0x2f0 [ 1435.627600] ? __switch_to+0x106/0x430 [ 1435.627606] process_one_work+0x1b3/0x380 [ 1435.627611] worker_thread+0x30/0x360 [ 1435.627614] ? __pfx_worker_thread+0x10/0x10 [ 1435.627617] kthread+0xe8/0x110 [ 1435.627620] ? __pfx_kthread+0x10/0x10 [ 1435.627623] ret_from_fork+0x2c/0x50 [ 1435.627627] [ 1435.627628] Modules linked in: udf crc_itu_t pktcdvd rfcomm ctr ccm cmac= algif_hash bnep binfmt_misc ip6_tables ip6t_rt xt_set xt_multiport xt_rece= nt xt_tcpudp ip_tables xt_conntrack nft_compat x_tables nft_chain_nat nf_na= t nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 nf_tables ip_set_hash_ipport i= p_set nfnetlink nls_ascii nls_cp437 vfat fat lp btusb btrtl btbcm btintel b= tmtk bluetooth uvcvideo jitterentropy_rng videobuf2_vmalloc videobuf2_memop= s videobuf2_v4l2 drbg videodev ansi_cprng videobuf2_common ecdh_generic ecc= mc snd_hda_codec_hdmi amdgpu intel_rapl_msr intel_rapl_common qmi_wwan qcs= erial gpu_sched cdc_wdm usb_wwan usbnet usbserial mii x86_pkg_temp_thermal = intel_powerclamp i915 radeon snd_ctl_led coretemp snd_hda_codec_realtek snd= _hda_codec_generic drm_buddy kvm_intel drm_display_helper snd_hda_intel iwl= dvm cec snd_intel_dspcfg snd_soc_rt5640 snd_intel_sdw_acpi drm_ttm_helper r= c_core kvm mac80211 snd_hda_codec snd_soc_rl6231 dell_laptop ttm dell_wmi m= sr ledtrig_audio irqbypass [ 1435.627676] libarc4 snd_hda_core ppdev sparse_keymap rapl drm_kms_helpe= r snd_soc_core dell_smbios intel_cstate dell_smm_hwmon snd_hwdep snd_compre= ss joydev evdev iwlwifi iTCO_wdt dcdbas intel_uncore intel_pmc_bxt drm pcsp= kr efi_pstore serio_raw wmi_bmof iTCO_vendor_support dell_wmi_descriptor li= s3lv02d_i2c watchdog parport_pc i2c_algo_bit cfg80211 snd_pcm lis3lv02d at2= 4 snd_timer sg parport snd dell_rbtn soundcore dell_smo8800 rfkill ac butto= n ext4 crc16 mbcache jbd2 btrfs blake2b_generic xor raid6_pq libcrc32c crc3= 2c_generic algif_skcipher af_alg dm_crypt dm_mod hid_cherry hid_generic usb= hid hid sd_mod t10_pi crc64_rocksoft_generic sr_mod crc64_rocksoft crc_t10d= if cdrom crct10dif_generic crc64 ahci libahci crct10dif_pclmul crct10dif_co= mmon crc32_pclmul crc32c_intel libata ghash_clmulni_intel sha512_ssse3 sha5= 12_generic e1000e aesni_intel sdhci_pci ehci_pci xhci_pci ehci_hcd cqhci sd= hci xhci_hcd crypto_simd scsi_mod ptp i2c_i801 psmouse cryptd i2c_smbus lpc= _ich scsi_common mmc_core [ 1435.627729] usbcore pps_core usb_common battery video wmi [last unloade= d: pktcdvd] [ 1435.627735] ---[ end trace 0000000000000000 ]--- [ 1435.788193] RIP: 0010:pkt_submit_bio+0x398/0x430 [pktcdvd] [ 1435.788204] Code: 55 28 41 89 55 28 41 3b 55 40 7c 07 41 83 7d 44 01 74 = 7c 4c 89 f7 e8 97 32 e1 e9 48 8b 7c 24 10 e8 8d 32 e1 e9 e9 e6 fe ff ff <0f= > 0b 0f 0b 49 8b 3f 48 c7 c1 a0 97 d0 c0 ba 00 0c 00 00 48 89 c6 [ 1435.788207] RSP: 0018:ffffb6a10007b828 EFLAGS: 00010283 [ 1435.788210] RAX: 0000000000000080 RBX: ffff8a4757170800 RCX: 00000000000= 01800 [ 1435.788212] RDX: 0000000000001604 RSI: 0000000000001680 RDI: 00000000000= 01603 [ 1435.788214] RBP: ffff8a4750a37480 R08: 0000000000000200 R09: fffffffffff= fff80 [ 1435.788216] R10: 0000000000000400 R11: 0000000000000040 R12: ffff8a4721b= d0dc0 [ 1435.788218] R13: 0000000000001000 R14: 0000000000000000 R15: ffff8a4739e= 56000 [ 1435.788221] FS: 0000000000000000(0000) GS:ffff8a4826b80000(0000) knlGS:= 0000000000000000 [ 1435.788223] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 1435.788226] CR2: 0000560a548f8490 CR3: 00000001949f0003 CR4: 00000000001= 706e0 [ 1435.788230] ------------[ cut here ]------------ [ 1435.788231] WARNING: CPU: 3 PID: 9 at kernel/exit.c:812 do_exit+0x91b/0x= be0 [ 1435.788237] Modules linked in: udf crc_itu_t pktcdvd rfcomm ctr ccm cmac= algif_hash bnep binfmt_misc ip6_tables ip6t_rt xt_set xt_multiport xt_rece= nt xt_tcpudp ip_tables xt_conntrack nft_compat x_tables nft_chain_nat nf_na= t nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 nf_tables ip_set_hash_ipport i= p_set nfnetlink nls_ascii nls_cp437 vfat fat lp btusb btrtl btbcm btintel b= tmtk bluetooth uvcvideo jitterentropy_rng videobuf2_vmalloc videobuf2_memop= s videobuf2_v4l2 drbg videodev ansi_cprng videobuf2_common ecdh_generic ecc= mc snd_hda_codec_hdmi amdgpu intel_rapl_msr intel_rapl_common qmi_wwan qcs= erial gpu_sched cdc_wdm usb_wwan usbnet usbserial mii x86_pkg_temp_thermal = intel_powerclamp i915 radeon snd_ctl_led coretemp snd_hda_codec_realtek snd= _hda_codec_generic drm_buddy kvm_intel drm_display_helper snd_hda_intel iwl= dvm cec snd_intel_dspcfg snd_soc_rt5640 snd_intel_sdw_acpi drm_ttm_helper r= c_core kvm mac80211 snd_hda_codec snd_soc_rl6231 dell_laptop ttm dell_wmi m= sr ledtrig_audio irqbypass [ 1435.788319] libarc4 snd_hda_core ppdev sparse_keymap rapl drm_kms_helpe= r snd_soc_core dell_smbios intel_cstate dell_smm_hwmon snd_hwdep snd_compre= ss joydev evdev iwlwifi iTCO_wdt dcdbas intel_uncore intel_pmc_bxt drm pcsp= kr efi_pstore serio_raw wmi_bmof iTCO_vendor_support dell_wmi_descriptor li= s3lv02d_i2c watchdog parport_pc i2c_algo_bit cfg80211 snd_pcm lis3lv02d at2= 4 snd_timer sg parport snd dell_rbtn soundcore dell_smo8800 rfkill ac butto= n ext4 crc16 mbcache jbd2 btrfs blake2b_generic xor raid6_pq libcrc32c crc3= 2c_generic algif_skcipher af_alg dm_crypt dm_mod hid_cherry hid_generic usb= hid hid sd_mod t10_pi crc64_rocksoft_generic sr_mod crc64_rocksoft crc_t10d= if cdrom crct10dif_generic crc64 ahci libahci crct10dif_pclmul crct10dif_co= mmon crc32_pclmul crc32c_intel libata ghash_clmulni_intel sha512_ssse3 sha5= 12_generic e1000e aesni_intel sdhci_pci ehci_pci xhci_pci ehci_hcd cqhci sd= hci xhci_hcd crypto_simd scsi_mod ptp i2c_i801 psmouse cryptd i2c_smbus lpc= _ich scsi_common mmc_core [ 1435.788398] usbcore pps_core usb_common battery video wmi [last unloade= d: pktcdvd] [ 1435.788407] CPU: 3 PID: 9 Comm: kworker/u8:0 Tainted: G S UD = 6.2.0-rc5 #4 [ 1435.788410] Hardware name: Dell Inc. Latitude E6440/02P3T1, BIOS A05 02/= 18/2014 [ 1435.788413] Workqueue: writeback wb_workfn (flush-253:0) [ 1435.788419] RIP: 0010:do_exit+0x91b/0xbe0 [ 1435.788423] Code: e8 8a 36 a5 00 8b 83 60 13 00 00 65 01 05 51 e9 f7 55 = e9 a8 fe ff ff 48 8b bb 98 09 00 00 31 f6 e8 ea d9 ff ff e9 24 fd ff ff <0f= > 0b e9 49 f7 ff ff 4c 89 ee bf 05 06 00 00 e8 61 f0 00 00 e9 ea [ 1435.788426] RSP: 0018:ffffb6a10007bee0 EFLAGS: 00010286 [ 1435.788429] RAX: 0000000000000000 RBX: ffff8a4700aacbc0 RCX: 00000000000= 00001 [ 1435.788431] RDX: 0000000000000001 RSI: 0000000000002710 RDI: 00000000fff= fffff [ 1435.788433] RBP: ffff8a4700aa4800 R08: 0000000000000000 R09: c0000000fff= fefff [ 1435.788436] R10: 0000000000000001 R11: ffffb6a10007b4e8 R12: ffff8a4700a= 90840 [ 1435.788438] R13: 000000000000000b R14: 0000000000000000 R15: ffffb6a1000= 7b778 [ 1435.788440] FS: 0000000000000000(0000) GS:ffff8a4826b80000(0000) knlGS:= 0000000000000000 [ 1435.788443] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 1435.788445] CR2: 0000560a548f8490 CR3: 00000001949f0003 CR4: 00000000001= 706e0 [ 1435.788447] Call Trace: [ 1435.788449] [ 1435.788451] ? worker_thread+0x30/0x360 [ 1435.788458] make_task_dead+0x6f/0x80 [ 1435.788462] rewind_stack_and_make_dead+0x17/0x20 [ 1435.788466] RIP: 0000:0x0 [ 1435.788470] Code: Unable to access opcode bytes at 0xffffffffffffffd6. [ 1435.788471] RSP: 0000:0000000000000000 EFLAGS: 00000000 ORIG_RAX: 000000= 0000000000 [ 1435.788473] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 00000000000= 00000 [ 1435.788474] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 00000000000= 00000 [ 1435.788475] RBP: 0000000000000000 R08: 0000000000000000 R09: 00000000000= 00000 [ 1435.788476] R10: 0000000000000000 R11: 0000000000000000 R12: 00000000000= 00000 [ 1435.788477] R13: 0000000000000000 R14: 0000000000000000 R15: 00000000000= 00000 [ 1435.788479] [ 1435.788480] ---[ end trace 0000000000000000 ]---