-
Notifications
You must be signed in to change notification settings - Fork 250
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DDE Linux struct page object aliasing #4809
Comments
USB devio splits large transaction into 16 KiB buffers in scatter-gather lists. Unfortunately, this mechanism seems unreliable most certainly because of issue genodelabs#4809 "DDE Linux struct page object aliasing".
USB devio splits large transaction into 16 KiB buffers in scatter-gather lists. Unfortunately, this mechanism seems unreliable most certainly because of issue genodelabs#4809 "DDE Linux struct page object aliasing". Issue genodelabs#5036
USB devio splits large transaction into 16 KiB buffers in scatter-gather lists. Unfortunately, this mechanism seems unreliable most certainly because of issue genodelabs#4809 "DDE Linux struct page object aliasing". Issue genodelabs#5036
USB devio splits large transaction into 16 KiB buffers in scatter-gather lists. Unfortunately, this mechanism seems unreliable most certainly because of issue genodelabs#4809 "DDE Linux struct page object aliasing". Issue genodelabs#5036
Fixed in Genode 23.11. |
The real fix is still not merged. |
Allocator for not-DMA-capable meta data buffers. Issue #4809
The management of Linux page structs is now tied to the life time of DMA buffers. Thus, page structs are created when a buffer is allocated and deallocated only when a buffer is freed - not on lx_emul_mem_free() because DMA buffers are cached. Page struct refcounting was entirely reworked in lx_emul/shadow/mm/page_alloc.c. Fixes #4809
Commit cfe7915 implements page-struct management per DMA buffer. Repositories for allwinner, imx, rpi, and zynq were also adapted for the change. NOw I cross fingers for nightly. Also, any test results for Pinephone and MNT Reform are much appreciated. |
I briefly tested the glmark2 preset on the PinePhone with the current staging branch. It works with the page-struct commits but after the sixth scenario the gpu driver fails to upgrade the I can look into that later this week. |
…e, non-dma dma_addr != 0) Issue #4809
The MNT Reform 2 also plays ball if the aforementioned fixup is applied (otherwise the |
Allocator for not-DMA-capable meta data buffers. Issue #4809
Due to the way the memory-allocation code is currently implemented and the
struct page
object handling is integrate aliasing that has unexpected side-effects can occur. Sincestruct page
objects are created for a page-size aligned address [1] when requested, allocations that fall within the same virtual page address range share the same object.Such objects are created lazy and and life-time management is only performed via ref-counting when the page API [2] (
alloc_pages
,free_pages
etc.) is used. Since the current implementation removesstruct page
objects [3] when performing allocations still referenced objects can become invalid and can be corrupted as the memory is re-used.[1]
genode/repos/dde_linux/src/lib/lx_emul/virt_to_page.c
Lines 20 to 37 in 7377166
[2] shadow/mmc/page_alloc.c
[3]
genode/repos/dde_linux/src/lib/lx_emul/alloc.cc
Lines 20 to 25 in 7377166
The text was updated successfully, but these errors were encountered: