On Thu, 7 Sept 2023 at 04:27, Heiko Carstens <hca@xxxxxxxxxxxxx> wrote: > > Note that the set_memory_xx() family comes with an int num_pages > parameter which overflows with 8TB. This could be addressed by > changing the num_pages parameter to unsigned long, however requires > to change all architectures, since the module code expects an int > parameter (see module_set_memory()). Bah. We should just do this. Change the 'start' to a pointer, and change the page count to 'unsigned long'. Changing module_set_memory() to take the right kind of function pointer looks trivial too. I'm not even sure why we did that "unsigned long addr" thing, but I assume it is because of our (very very _very_ old) historical get_free_pages() model. We should probably change get_free_pages() too, but that literally goes back to linux-0.01. It's horrendously bad, but it's _very_ traditional, and it comes from the VM code historically using bitops on the page pointers. Linus