Re: [GIT PULL] more s390 updates for 6.6 merge window
From: Christoph Hellwig
Date: Tue Sep 26 2023 - 03:28:43 EST
On Thu, Sep 07, 2023 at 11:02:23AM -0700, Linus Torvalds wrote:
> 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.
Yes, please. And maybe pick a better name for the void * returning
version. kmalloc_pages/kfree_pages? or is that to close to
kmalloc/kfree?