From 909e664a2e2c89a5a7aac7c19c7a8124700f1faa Mon Sep 17 00:00:00 2001 From: "Dmitry V. Levin" Date: Thu, 28 Apr 2016 21:10:59 +0000 Subject: [PATCH] tests/remap_file_pages.c: fix for the upcoming change of xlat.val type The "flags" argument of remap_file_page syscall has type "unsigned long", so it is not correct to load most significant bits with garbage ans assume they are going to be ignored. * tests/remap_file_pages.c (main): Remove artificial garbage from flags. --- tests/remap_file_pages.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/remap_file_pages.c b/tests/remap_file_pages.c index 3714a17a..8626e7f0 100644 --- a/tests/remap_file_pages.c +++ b/tests/remap_file_pages.c @@ -44,8 +44,7 @@ main(void) const unsigned long prot = (unsigned long) 0xacedcafe00000000 | PROT_READ|PROT_WRITE|PROT_EXEC; const unsigned long pgoff = (unsigned long) 0xcaf3babebad4deed; - const unsigned long flags = (unsigned long) 0xbadc0ded00000000 - | MAP_PRIVATE|MAP_ANONYMOUS; + const unsigned long flags = MAP_PRIVATE|MAP_ANONYMOUS; long rc = syscall(__NR_remap_file_pages, addr, size, prot, pgoff, flags); printf("remap_file_pages(%#lx, %lu, %s, %lu, %s) = %ld %s (%m)\n", -- 2.40.0