diff options
-rw-r--r-- | meta/recipes-extended/ltp/ltp/0001-ltp-vma03-fix-the-alginment-of-page-size.patch | 34 | ||||
-rw-r--r-- | meta/recipes-extended/ltp/ltp_20150420.bb | 1 |
2 files changed, 35 insertions, 0 deletions
diff --git a/meta/recipes-extended/ltp/ltp/0001-ltp-vma03-fix-the-alginment-of-page-size.patch b/meta/recipes-extended/ltp/ltp/0001-ltp-vma03-fix-the-alginment-of-page-size.patch new file mode 100644 index 0000000000..905eafb991 --- /dev/null +++ b/meta/recipes-extended/ltp/ltp/0001-ltp-vma03-fix-the-alginment-of-page-size.patch | |||
@@ -0,0 +1,34 @@ | |||
1 | From 243881d71d2d49027c3dc15fe27ebe7f4ee68700 Mon Sep 17 00:00:00 2001 | ||
2 | From: Chuang Dong <Chuang.Dong@windriver.com> | ||
3 | Date: Wed, 10 Jun 2015 09:51:09 +0800 | ||
4 | Subject: [PATCH] ltp: vma03 fix the alginment of page size | ||
5 | |||
6 | the offset the param of mmap2() doesn't align the page size, but, | ||
7 | this param allow must be a multiple of the page size as returned | ||
8 | by sysconf(_SC_PAGE_SIZE).meanwhile offset * 4096 must be a | ||
9 | multiple of the system page size, so modify the input param of offset | ||
10 | pgoff = (ULONG_MAX - 1)&(~((pgsz-1)>>12)); | ||
11 | |||
12 | Upstream-Status: Submitted | ||
13 | |||
14 | Signed-off-by: Chuang Dong <Chuang.Dong@windriver.com> | ||
15 | --- | ||
16 | testcases/kernel/mem/vma/vma03.c | 2 +- | ||
17 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
18 | |||
19 | diff --git a/testcases/kernel/mem/vma/vma03.c b/testcases/kernel/mem/vma/vma03.c | ||
20 | index 6af9960..b86d7ce 100644 | ||
21 | --- a/testcases/kernel/mem/vma/vma03.c | ||
22 | +++ b/testcases/kernel/mem/vma/vma03.c | ||
23 | @@ -89,7 +89,7 @@ int main(int argc, char *argv[]) | ||
24 | if (fd == -1) | ||
25 | tst_brkm(TBROK | TERRNO, NULL, "open %s", TESTFILE); | ||
26 | |||
27 | - pgoff = ULONG_MAX - 1; | ||
28 | + pgoff = (ULONG_MAX - 1)&(~((pgsz-1)>>12)); | ||
29 | map = mmap2(NULL, pgsz, PROT_READ | PROT_WRITE, MAP_PRIVATE, | ||
30 | fd, pgoff); | ||
31 | if (map == MAP_FAILED) | ||
32 | -- | ||
33 | 1.8.5.2.233.g932f7e4 | ||
34 | |||
diff --git a/meta/recipes-extended/ltp/ltp_20150420.bb b/meta/recipes-extended/ltp/ltp_20150420.bb index b4fc223a14..2554f52a96 100644 --- a/meta/recipes-extended/ltp/ltp_20150420.bb +++ b/meta/recipes-extended/ltp/ltp_20150420.bb | |||
@@ -28,6 +28,7 @@ SRC_URI = "git://github.com/linux-test-project/ltp.git \ | |||
28 | file://make-setregid02-work.patch \ | 28 | file://make-setregid02-work.patch \ |
29 | file://add-knob-for-numa.patch \ | 29 | file://add-knob-for-numa.patch \ |
30 | file://add-knob-for-tirpc.patch \ | 30 | file://add-knob-for-tirpc.patch \ |
31 | file://0001-ltp-vma03-fix-the-alginment-of-page-size.patch \ | ||
31 | " | 32 | " |
32 | 33 | ||
33 | S = "${WORKDIR}/git" | 34 | S = "${WORKDIR}/git" |