summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChuang Dong <Chuang.Dong@windriver.com>2015-06-30 17:02:45 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-07-02 23:02:15 +0100
commitf9a140441ab27c6e90d108ced76cff2dc70eedf2 (patch)
tree8513e34d844ffb2b390ae6ea11c644b2ba16eb21
parente77fda5fb6cb0a35308e4620ca4602715a471fbe (diff)
downloadopenembedded-core-contrib-f9a140441ab27c6e90d108ced76cff2dc70eedf2.tar.gz
openembedded-core-contrib-f9a140441ab27c6e90d108ced76cff2dc70eedf2.tar.bz2
openembedded-core-contrib-f9a140441ab27c6e90d108ced76cff2dc70eedf2.zip
ltp: vma03 fix the alginment of page size
the offset the param of mmap2() doesn't align the page size, but, this param allow must be a multiple of the page size as returned by sysconf(_SC_PAGE_SIZE).meanwhile offset * 4096 must be a multiple of the system page size, so modify the input param of offset pgoff = (ULONG_MAX - 1)&(~((pgsz-1)>>12)); Signed-off-by: Chuang Dong <Chuang.Dong@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
-rw-r--r--meta/recipes-extended/ltp/ltp/0001-ltp-vma03-fix-the-alginment-of-page-size.patch34
-rw-r--r--meta/recipes-extended/ltp/ltp_20150420.bb1
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 @@
+From 243881d71d2d49027c3dc15fe27ebe7f4ee68700 Mon Sep 17 00:00:00 2001
+From: Chuang Dong <Chuang.Dong@windriver.com>
+Date: Wed, 10 Jun 2015 09:51:09 +0800
+Subject: [PATCH] ltp: vma03 fix the alginment of page size
+
+the offset the param of mmap2() doesn't align the page size, but,
+this param allow must be a multiple of the page size as returned
+by sysconf(_SC_PAGE_SIZE).meanwhile offset * 4096 must be a
+multiple of the system page size, so modify the input param of offset
+pgoff = (ULONG_MAX - 1)&(~((pgsz-1)>>12));
+
+Upstream-Status: Submitted
+
+Signed-off-by: Chuang Dong <Chuang.Dong@windriver.com>
+---
+ testcases/kernel/mem/vma/vma03.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/testcases/kernel/mem/vma/vma03.c b/testcases/kernel/mem/vma/vma03.c
+index 6af9960..b86d7ce 100644
+--- a/testcases/kernel/mem/vma/vma03.c
++++ b/testcases/kernel/mem/vma/vma03.c
+@@ -89,7 +89,7 @@ int main(int argc, char *argv[])
+ if (fd == -1)
+ tst_brkm(TBROK | TERRNO, NULL, "open %s", TESTFILE);
+
+- pgoff = ULONG_MAX - 1;
++ pgoff = (ULONG_MAX - 1)&(~((pgsz-1)>>12));
+ map = mmap2(NULL, pgsz, PROT_READ | PROT_WRITE, MAP_PRIVATE,
+ fd, pgoff);
+ if (map == MAP_FAILED)
+--
+1.8.5.2.233.g932f7e4
+
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 \
file://make-setregid02-work.patch \
file://add-knob-for-numa.patch \
file://add-knob-for-tirpc.patch \
+ file://0001-ltp-vma03-fix-the-alginment-of-page-size.patch \
"
S = "${WORKDIR}/git"