Closed sulaimansuhas closed 5 months ago
I also noticed some undefined behaviour in the homa_grant_check_rpc() function. I have submitted a quick fix for that in this PR as well!
Can you say a bit more about what is the undefined behavior you found in homa_grant_check_rpc? Also, your patch appears to reference the variable "rank" multiple times before it has been set; am I missing something?
Sorry, I fixed the code and moved the line that sets the rank out of the if condition to before it is referenced.
The undefined behavior occured when the rank of the rpc was < 0, it was cause an out of bounds UB by calling
&homa->active_remaining[-1]
.
Ahah, good catch. I have pushed a fix; your fix didn't appear to handle the case where the rank was exactly 0, so my fix is a bit different. I have not merged your full pull request, since it requires linux 6.5; I will eventually do that when I upgrade to 6.5.
As has been noted in an issue, there has been some issues compiling Homa with kernel versions 6.5+. I am currently working with kernel versions 6.5 and 6.6 for my research, and have modified the module so as to get it working with said kernel versions.
Main Changes:
send_page()
has been replaced with a flag passed tosendmsg().
So I have removed anysend_page()
code in the module since it hasn't be implemented for homa yet.ioctl()
's call signature has been changed. It takes a*int
instead ofunsigned long
that referred to a userspace pointer. I am a bit iffy on the change I made to get this to compile. It feels a bit hacky, and we might have to change the homa_abort() function a bit to make a cleaner change - I am looking for input on this issue 🙏🏿 .