Skip to content

Conversation

teburd
Copy link
Contributor

@teburd teburd commented Oct 6, 2025

DMA syscalls as they were implemented were unsafe. Accepting a void* was never acceptable as many things could not be verified about it. Accepting a channel identifier meant that a user mode thread could start/stop any DMA channel which in theory could be owned by any other driver. This shouldn't be possible.

Likely we need to at least rethink this by making the pair (dma device, dma channel) a kobject that can be granted/revoked on at the very least.

Related #96985

RFC for breaking change #97071

@teburd teburd self-assigned this Oct 6, 2025
@zephyrbot zephyrbot added the area: DMA Direct Memory Access label Oct 6, 2025
DMA syscalls as they were implemented were unsafe. Accepting a void* was
never acceptable as many things could not be verified about it.
Accepting a channel identifier meant that a user mode thread could
start/stop any DMA channel which in theory could be owned by any other
driver. This shouldn't be possible.

Signed-off-by: Tom Burdick <[email protected]>
Copy link

sonarqubecloud bot commented Oct 6, 2025

@edersondisouza
Copy link
Contributor

Shouldn't these go through the deprecation process before being removed? I mean, they seem to be as old as 2018...

@teburd teburd added the Architecture Review Discussion in the Architecture WG required label Oct 6, 2025
@teburd teburd added the DNM This PR should not be merged (Do Not Merge) label Oct 6, 2025
@teburd
Copy link
Contributor Author

teburd commented Oct 6, 2025

Marking DNM until deprecation process is done

@teburd
Copy link
Contributor Author

teburd commented Oct 6, 2025

Shouldn't these go through the deprecation process before being removed? I mean, they seem to be as old as 2018...

API isn't changing, but yes the dropping of syscall is something that likely needs to be considered. It's wrong though as its written so we do need to drop this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Architecture Review Discussion in the Architecture WG required area: DMA Direct Memory Access DNM This PR should not be merged (Do Not Merge)
Projects
Status: Todo
Development

Successfully merging this pull request may close these issues.

5 participants