PlatformLab / HomaModule

A Linux kernel module that implements the Homa transport protocol.
175 stars 43 forks source link

Changes to allow compilation on kernel versions 6.5+ #55

Closed sulaimansuhas closed 5 months ago

sulaimansuhas commented 7 months ago

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:

sulaimansuhas commented 6 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!

johnousterhout commented 6 months ago

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?

sulaimansuhas commented 6 months ago

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].

johnousterhout commented 6 months ago

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.