diff options
author | BALATON Zoltan <balaton@eik.bme.hu> | 2024-05-05 14:10:08 +0200 |
---|---|---|
committer | Philippe Mathieu-Daudé <philmd@linaro.org> | 2024-05-06 11:17:15 +0200 |
commit | 86b7c5518232c8e5cda7951cbe62b0b23fc0b4e5 (patch) | |
tree | 9bf78ea08c94d92d5cd98dd2484e8f97fbf04e85 /linux-user | |
parent | 1072f927f0966d37b37c52084b4eb957288b2704 (diff) |
exec/cpu: Rename PAGE_BITS macro to PAGE_RWX
This macro can be used to abbreviate PAGE_READ | PAGE_WRITE | PAGE_EXEC
for which PAGE_RWX is a better name and renaming it also shows it is
not related to TARGET_PAGE_BITS.
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20240505121008.44A0D4E602D@zero.eik.bme.hu>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Diffstat (limited to 'linux-user')
-rw-r--r-- | linux-user/elfload.c | 2 | ||||
-rw-r--r-- | linux-user/mmap.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/linux-user/elfload.c b/linux-user/elfload.c index f9461d2844..41fae2b520 100644 --- a/linux-user/elfload.c +++ b/linux-user/elfload.c @@ -2361,7 +2361,7 @@ static bool zero_bss(abi_ulong start_bss, abi_ulong end_bss, if (start_bss < align_bss) { int flags = page_get_flags(start_bss); - if (!(flags & PAGE_BITS)) { + if (!(flags & PAGE_RWX)) { /* * The whole address space of the executable was reserved * at the start, therefore all pages will be VALID. diff --git a/linux-user/mmap.c b/linux-user/mmap.c index be3b9a68eb..66a1631094 100644 --- a/linux-user/mmap.c +++ b/linux-user/mmap.c @@ -117,7 +117,7 @@ static void shm_region_rm_complete(abi_ptr start, abi_ptr last) static int validate_prot_to_pageflags(int prot) { int valid = PROT_READ | PROT_WRITE | PROT_EXEC | TARGET_PROT_SEM; - int page_flags = (prot & PAGE_BITS) | PAGE_VALID; + int page_flags = (prot & PAGE_RWX) | PAGE_VALID; #ifdef TARGET_AARCH64 { |