diff options
author | Heiko Carstens <hca@linux.ibm.com> | 2023-08-25 15:29:52 +0300 |
---|---|---|
committer | Heiko Carstens <hca@linux.ibm.com> | 2023-08-30 12:03:28 +0300 |
commit | 850612c8e4fb048905af597cbd25dfbb40d9ffdf (patch) | |
tree | 5cbc969e312fafd9dec36b2eef0a5a889d557232 /arch/s390/mm/pageattr.c | |
parent | c22a4c8aaf60780ce21fb2b5c8019e12457ee949 (diff) | |
download | linux-850612c8e4fb048905af597cbd25dfbb40d9ffdf.tar.xz |
s390/set_memory: add __set_memory() variant
Add a __set_memory_yy() variant for all set_memory_yy()
implementations. The new variant takes start and end void pointers,
which allows them to be used without the usual unsigned long cast.
However more important: the new variant can be used for areas larger
than 8TB. The old variant comes with an "int numpages" parameter, which
overflows with more than 8TB. Given that for debug_pagealloc
set_memory_4k() is used on the whole kernel mapping this is not only a
theoretical problem, but must be fixed.
Changing all set_memory_yy() variants only on s390 to take an "unsigned
long numpages" parameter is not possible, since the common module code
requires an int parameter from all architectures on these functions.
See module_set_memory().
Therefore change/fix this on s390 only with a new interface, and address
common code later.
Reviewed-by: Alexander Gordeev <agordeev@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Diffstat (limited to 'arch/s390/mm/pageattr.c')
-rw-r--r-- | arch/s390/mm/pageattr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/s390/mm/pageattr.c b/arch/s390/mm/pageattr.c index ca5a418c58a8..43c919c7bafb 100644 --- a/arch/s390/mm/pageattr.c +++ b/arch/s390/mm/pageattr.c @@ -373,7 +373,7 @@ static int change_page_attr_alias(unsigned long addr, unsigned long end, return rc; } -int __set_memory(unsigned long addr, int numpages, unsigned long flags) +int __set_memory(unsigned long addr, unsigned long numpages, unsigned long flags) { unsigned long end; int rc; |