Skip to content
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

Properly implement UserSpacePtr #102

Open
todo bot opened this issue Dec 22, 2018 · 1 comment
Open

Properly implement UserSpacePtr #102

todo bot opened this issue Dec 22, 2018 · 1 comment
Assignees
Labels
project-kernel Related to the kernel safety Something is unsound, could be unsafe todo 🗒️ Created by the todo bot type-bug Something isn't working
Milestone

Comments

@todo
Copy link

todo bot commented Dec 22, 2018

UserSpacePtr right now is just a glorified, horribly unsafe reference. We should change its interface to provide a lot more safety. It should have a get function returning a Result<T, UserspaceError> that copies the underlying type, returning an error if the underlying pointer is invalid (at least if it points to kernel memory. Maybe also if it is not mapped?).
We also have to handle unsized types. Maybe have a get_ref() which returns a &T? Maybe don't allow unsized types? I should check how Horizon/NX deals with it in sendsyncrequest (that's the only place that allows huge data afaik)


https://github.com/roblabla42/KFS/blob/adee47274ba5c0dc0ef112ce8933becd63d3da77/kernel/src/mem.rs#L199-L209


This issue was generated by todo based on a TODO comment in adee472 when #90 was merged. cc @roblabla.
@todo todo bot assigned roblabla Dec 22, 2018
@todo todo bot added the todo 🗒️ Created by the todo bot label Dec 22, 2018
@roblabla roblabla added type-bug Something isn't working project-kernel Related to the kernel safety Something is unsound, could be unsafe labels Dec 23, 2018
@roblabla roblabla added this to the KFS-6 milestone Jan 21, 2019
@roblabla
Copy link
Member

See #231

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
project-kernel Related to the kernel safety Something is unsound, could be unsafe todo 🗒️ Created by the todo bot type-bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant