Skip to content

RFC: Drop syscalls for DMA #97071

@teburd

Description

@teburd

Problem Description

DMA currently has marked a number of functions as syscalls, but the current implementation...

  • Expects to somehow validate a void* in some cases which could be used to branch on later without going through the typical syscall parameter verification that is required. There's no reasonable way to actually validate void* in this case at an API level like other syscalls, it'd be done at a per driver level. Even if you could acquire and release a channel, you definitely can't configure a channel from user mode as this could let you work around memory protection. Drop this idea entirely.
  • Exposes all dma channels to any user mode thread granted the dma device object, effectively letting a user mode thread control any dma channel, even if only a single channel is needed. The API over scopes the permission grant to the entire DMA controller.

Proposed Change (Summary)

Drop syscall annotations in dma.h and related implementation details.

Perhaps re-introduce the idea of DMA from user mode later with dma channels as kobjects that can be individually controlled and granted permissions on.

Important

Some of these functions have been marked syscalls since at least 1.14 lts which is quite a long time!

Metadata

Metadata

Labels

RFCRequest For Comments: want input from the community

Type

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions