dma-mapping: remove CONFIG_DMA_REMAP
commit f5ff79fddf0efecca538046b5cc20fb3ded2ec4f
Author: Christoph Hellwig <[email protected]> Date: Sat Feb 26 16:40:21 2022 +0100
dma-mapping: remove CONFIG_DMA_REMAP
causes user land applications doing DMA to and from a pci card to cause kernel Oops below. I have 2 different types of pci cards that use the kernel dma_alloc_coherent to get DMA memory this fails on.
2022-06-07T14:01:34.109721-04:00 harley kernel: [ 1570.232238][ T4301] prmdiag: Corrupted page table at address 7fb71872a000 2022-06-07T14:01:34.109732-04:00 harley kernel: [ 1570.232247][ T4301] PGD 212e99067 P4D 212e99067 PUD 18bf6b067 PMD 1e373f067 PTE 80001fa406411235 2022-06-07T14:01:34.109733-04:00 harley kernel: [ 1570.232252][ T4301] Bad pagetable: 000d [#1] PREEMPT SMP NOPTI 2022-06-07T14:01:34.109734-04:00 harley kernel: [ 1570.232256][ T4301] CPU: 7 PID: 4301 Comm: prmdiag Tainted: G WC O 5.18.1 #3 2022-06-07T14:01:34.109736-04:00 harley kernel: [ 1570.232260][ T4301] Hardware name: BIOSTAR Group B550GTA/B550GTA, BIOS 5.17 12/03/2021 2022-06-07T14:01:34.109736-04:00 harley kernel: [ 1570.232262][ T4301] RIP: 0033:0x7fb717180e8f 2022-06-07T14:01:34.109737-04:00 harley kernel: [ 1570.232267][ T4301] Code: 16 c0 c5 fe 7f 07 c5 fe 7f 4f 20 c5 fe 7f 54 17 e0 c5 fe 7f 5c 17 c0 c5 f8 77 c3 48 39 f7 0f 87 ab 00 00 00 0f 84 e2 fe ff ff <c5> fe 6f 26 c5 fe 6f 6c 16 e0 c5 fe 6f 74 16 c0 c5 fe 6f 7c 16 a0 2022-06-07T14:01:34.109746-04:00 harley kernel: [ 1570.232272][ T4301] RSP: 002b:00007ffd3ae7a328 EFLAGS: 00010283 2022-06-07T14:01:34.109746-04:00 harley kernel: [ 1570.232275][ T4301] RAX: 00007fb70f3ff010 RBX: 00000000fabe65e4 RCX: 00007fb71872a000 2022-06-07T14:01:34.109747-04:00 harley kernel: [ 1570.232278][ T4301] RDX: 0000000000100000 RSI: 00007fb71872a000 RDI: 00007fb70f3ff010 2022-06-07T14:01:34.109748-04:00 harley kernel: [ 1570.232281][ T4301] RBP: 00007ffd3ae7a360 R08: 00000000000000fe R09: 00000000000000fd 2022-06-07T14:01:34.109749-04:00 harley kernel: [ 1570.232283][ T4301] R10: 00000000000000ff R11: 0000000000000246 R12: 00007fb717cec210 2022-06-07T14:01:34.109749-04:00 harley kernel: [ 1570.232286][ T4301] R13: 00007ffd3ae7adf0 R14: 0000000000ab8b80 R15: 0000000000abe798 2022-06-07T14:01:34.109750-04:00 harley kernel: [ 1570.232289][ T4301] FS: 00007fb718831780 GS: 0000000000000000 2022-06-07T14:01:34.109751-04:00 harley kernel: [ 1570.232291][ T4301] Modules linked in: eprm(O) af_packet iscsi_ibft iscsi_boot_sysfs rfkill dmi_sysfs intel_rapl_msr intel_rapl_common ppdev kvm irqbypass crct10dif_pclmul crc32_pclmul ghash_clmulni_intel joydev aesni_intel crypto_simd cryptd wmi_bmof pcspkr sp5100_tco k10temp perle_serial(O) dgap(C) r8169 i2c_piix4 ccp realtek mdio_devres 3c59x synclink_gt parport_pc libphy hdlc parport mii thermal gpio_amdpt gpio_generic tiny_power_button fuse configfs snd_hda_codec_realtek snd_hda_codec_generic ledtrig_audio hid_generic usbhid nouveau video drm_ttm_helper ttm i2c_algo_bit mxm_wmi drm_dp_helper drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops crc32c_intel drm serio_raw aic7xxx scsi_transport_spi xhci_pci sr_mod xhci_pci_renesas cdrom xhci_hcd usbcore usb_common wmi pinctrl_amd button snd_hda_intel snd_intel_dspcfg snd_intel_sdw_acpi snd_hda_codec snd_hwdep snd_hda_core snd_pcm snd_timer snd soundcore sg dm_multipath dm_mod scsi_dh_rdac scsi_dh_emc scsi_dh_alua msr 2022-06-07T14:01:34.109751-04:00 harley kernel: [ 1570.232347][ T4301] ---[ end trace 0000000000000000 ]--- 2022-06-07T14:01:34.109752-04:00 harley kernel: [ 1570.232350][ T4301] RIP: 0033:0x7fb717180e8f 2022-06-07T14:01:34.109753-04:00 harley kernel: [ 1570.232352][ T4301] RSP: 002b:00007ffd3ae7a328 EFLAGS: 00010283 2022-06-07T14:01:34.109753-04:00 harley kernel: [ 1570.232355][ T4301] RAX: 00007fb70f3ff010 RBX: 00000000fabe65e4 RCX: 00007fb71872a000 2022-06-07T14:01:34.109754-04:00 harley kernel: [ 1570.232357][ T4301] RDX: 0000000000100000 RSI: 00007fb71872a000 RDI: 00007fb70f3ff010 2022-06-07T14:01:34.109755-04:00 harley kernel: [ 1570.232360][ T4301] RBP: 00007ffd3ae7a360 R08: 00000000000000fe R09: 00000000000000fd 2022-06-07T14:01:34.109756-04:00 harley kernel: [ 1570.232362][ T4301] R10: 00000000000000ff R11: 0000000000000246 R12: 00007fb717cec210 2022-06-07T14:01:34.109756-04:00 harley kernel: [ 1570.232365][ T4301] R13: 00007ffd3ae7adf0 R14: 0000000000ab8b80 R15: 0000000000abe798 2022-06-07T14:01:34.109757-04:00 harley kernel: [ 1570.232367][ T4301] FS: 00007fb718831780(0000) GS:ffff96d87ebc0000(0000) knlGS:0000000000000000 2022-06-07T14:01:34.109757-04:00 harley kernel: [ 1570.232370][ T4301] CS: 0033 DS: 0000 ES: 0000 CR0: 0000000080050033 2022-06-07T14:01:34.109758-04:00 harley kernel: [ 1570.232373][ T4301] CR2: 00007fb71872a000 CR3: 00000001e36e2000 CR4: 0000000000350ee0
Revert that commit and all works like normal. This commit breaks user land.
Regards
Mark
Quoted 1 line · Mark Hounschell
Revert that commit and all works like normal. This commit breaks user land.
No. We had that discussion before. It exposeѕ how broken your out of tree driver is, which you don't bother to fix despite Robin even taking the pains to explain you how.
Quoted 6 lines · Christoph Hellwig
Quoted 1 line · Mark Hounschell
Revert that commit and all works like normal. This commit breaks user land.
No. We had that discussion before. It exposeѕ how broken your out of tree driver is, which you don't bother to fix despite Robin even taking the pains to explain you how.
No, this is not the original issue and we never actually had a discussion. That original issue was about using Set/ClearPageReserved. You nor Robin even tried to explain why it was wrong to use it. It was never an issue in previous kernels. Why now? In any case I have removed that code. This is what happens now.
What is it you think I am doing wrong. Except for using Set/ClearPageReserved you have not explained anything to me.
Mark
Quoted 8 lines · Mark Hounschell
Quoted 6 lines · Christoph Hellwig
Quoted 1 line · Mark Hounschell
Revert that commit and all works like normal. This commit breaks user land.
No. We had that discussion before. It exposeѕ how broken your out of tree driver is, which you don't bother to fix despite Robin even taking the pains to explain you how.
Quoted 8 lines
No, this is not the original issue and we never actually had a discussion. That original issue was about using Set/ClearPageReserved. You nor Robin even tried to explain why it was wrong to use it. It was never an issue in previous kernels. Why now? In any case I have removed that code. This is what happens now.
What is it you think I am doing wrong. Except for using Set/ClearPageReserved you have not explained anything to me.
Which part of "you must not call virt_to_page on the result that is very clearly stated in the documentation and has been explained to you repeatly" is still not clear to you?
Which part of "if your of tree modules stops working, this does not constitute userspace breakage" is not clear to you?
I'm done with this, please stop bothering me.
Quoted 15 lines · Christoph Hellwig
Quoted 14 lines · Mark Hounschell
Quoted 6 lines · Christoph Hellwig
Quoted 1 line · Mark Hounschell
Revert that commit and all works like normal. This commit breaks user land.
No. We had that discussion before. It exposeѕ how broken your out of tree driver is, which you don't bother to fix despite Robin even taking the pains to explain you how.
No, this is not the original issue and we never actually had a discussion. That original issue was about using Set/ClearPageReserved. You nor Robin even tried to explain why it was wrong to use it. It was never an issue in previous kernels. Why now? In any case I have removed that code. This is what happens now.
Quoted 7 lines
Quoted 2 lines
What is it you think I am doing wrong. Except for using Set/ClearPageReserved you have not explained anything to me.
Which part of "you must not call
virt_to_pageon the result that is very clearly stated in the documentation and has been explained to you repeatly" is still not clear to you?
That has not been explained to me at all. I am NOT any longer using virt_to_page at all anywhere in the driver. I was told that Set/ClearPageReserve was what I was doing wrong. Not that I was using virt_to_page with it. I am not using either now. I am using only dma_alloc_coherent.
Quoted 4 lines
Which part of "if your of tree modules stops working, this does not constitute userspace breakage" is not clear to you?
I'm done with this, please stop bothering me.
I am not trying to bother you and there is no reason for you to be rude to me. I just think this is a bug and am trying to get to the bottom of it.
Regards
Mark
Quoted 1 line · Mark Hounschell
Revert that commit and all works like normal. This commit breaks user land.
Seems like it only breaks an out-of-tree driver, and for obvious reasons, there's nothing we can do about that, sorry. You are on your own here. Please work with your company to get your driver merged to the tree and then we will be glad to help out with these types of issues.
thanks,
greg k-h