Skip to content

Simply system call stub generation #42562

@andyross

Description

@andyross

This is a stale idea but still relevant. I'm fairly sure there's a very similar enhancement sitting around in the bug list with a very similar comment from me, but I can't find it. Resubmitting it here in case it got dropped or lost, or if my memory is wrong.

When the timeout rework went in (which required 64 bit system call arguments), the system call API was orthogonalized to separate the auto-generated "marshal" code from the hand-audited "verify" step (they used to be the same function). And that's a good thing.

But one of the features lost was the ability to define a system call handler with a single macro, e.g. one that has only arguments that are by-value registers or kernel object pointers of a known type. Those need to be inspected by hand now. And that's sort of tedious.

It would be nice to have this back, so simple system calls can be a single function with a single __syscall tag. Maybe it could grow into a __syscall(...) macro so that arguments could be passed to the python generating code declaring what kind of generation was needed (e.g. specifying types or constraints, etc...).

Metadata

Metadata

Assignees

Labels

EnhancementChanges/Updates/Additions to existing featuresarea: UserspaceUserspace

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions