-
-
Notifications
You must be signed in to change notification settings - Fork 7
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
unmap with size 0x1 #175
Comments
Thanks for the report. Do you have a public repository for this code? I'd like to check what's going on there. |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
Looking into it even further, this behavior doesn't surprise me anymore.
The debugger confirms this. This doesn't seem correct to me, but then I also don't know the design behind the crate, or I am missing something. |
Thanks for the investigation, and sorry for the late reply and for bothering you. I believe your investigation is correct. |
I think this is reasonable given how easy it makes the underlying implementation of the xhci crate, however I think this should be well documented, and could probably also be implemented (maybe in the |
For the documentation, I agree that a little more docs are needed for the xhci crate, like "the mapper and unmapper must be able to deal with per byte mappings."
I'm sorry, but I couldn't understand it. Could you tell me a bit more? |
The accessor crate could already implement a structure such that a user doesn't have to handle single byte deallocations. Everyone would probably implement it in the same way. This would also make mapping and unmapping consistent. Right now, the mapper may need to map 1 full page, but for that page he gets 4096 single byte unmap requests. I think it would make sense if it worked like a memory allocator, where the unmaps are of the same size as the maps. This would also be consistent with the |
Hi, I have implemented a mapper, and my kernel gave me an error originating from the
unmap
function. I've logged the allocations and deallocations that the mapper wants to perform, and I getMy kernel does all of these allocations, but then the mapper wants to deallocate a valid pointer with an invalid size.
My mapper is the following:
To me, it seems like the mapper is called incorrectly from inside the xhci crate, but I may be wrong. I'd be thankful for any help.
The text was updated successfully, but these errors were encountered: