kmod: igb_main: Use slow_virt_to_phys() instead of virt_to_phys()#47
kmod: igb_main: Use slow_virt_to_phys() instead of virt_to_phys()#47MarcinMiklas wants to merge 1 commit intoAvnu:masterfrom
Conversation
In kernel >=v6.8.0 virt_to_phys() returns address which is not usable from userspace. It was working fine in kernels up to v6.7.x. I failed to find which exactly commit (or maybe kernel config option) causes that change of behaviour. What I understand, neither virt_to_phys() nor slow_virt_to_phys() should be used in drivers for dma transfers, we are triggering dma transfers from userspace which is even more evil.
|
I checked the issue on debian 12 machine (previously I was working on ubuntu 22.04) and problem occurs also on kernel 6.1, so it is rather kernel configuration which causes it. I didn't share the details of the crash before so I am doing it now. Here is dmesg output:
The issue is triggered from user space in function igb_allocate_queues() which can be found in lib/igb.c file. Exactly this memset is causing it. |
|
@MarcinMiklas Did you ever find out which kernel config caused this issue ? |
In kernel >=v6.8.0 virt_to_phys() returns address which is not usable from userspace. It was working fine in kernels up to v6.7.x.
I failed to find which exactly commit (or maybe kernel config option) causes that change of behaviour. What I understand, neither virt_to_phys() nor slow_virt_to_phys() should be used in drivers for dma transfers, we are triggering dma transfers from userspace which is even more evil.