Return page size as unsigned long

Currently page_size() returns unsigned int value that is after "bitwise
not" is promoted to unsigned long value e.g. in uffd.c
handle_page_fault. Since the value is unsigned promotion is done with 0
MSB that results in lost of MSB pagefault address bits. So make
page_size to return  unsigned long to avoid such situation.

Signed-off-by: Vladislav Khmelevsky <och95@yandex.ru>
This commit is contained in:
Vladislav Khmelevsky 2023-06-20 13:23:24 +04:00 committed by Andrei Vagin
parent 00f8a56b6e
commit 28adebefb7
6 changed files with 10 additions and 10 deletions

View file

@ -27,7 +27,7 @@ static struct rt_sigframe *sigframe;
*/
static unsigned __page_size;
unsigned __attribute((weak)) page_size(void)
unsigned long __attribute((weak)) page_size(void)
{
return __page_size;
}