summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-benchmark/libhugetlbfs/files/add-PROT-NONE-to-the-mprotest-test.patch
diff options
context:
space:
mode:
authorTudor Florea <tudor.florea@enea.com>2014-10-10 03:20:04 +0200
committerTudor Florea <tudor.florea@enea.com>2014-10-10 03:20:04 +0200
commit1b8dfe266937a37a4c642f96ceb2347bf4c00a17 (patch)
tree0c6aab146bb3c82efd9c7846a9a4e70dcb0ec84f /meta-oe/recipes-benchmark/libhugetlbfs/files/add-PROT-NONE-to-the-mprotest-test.patch
downloadmeta-openembedded-daisy-140929.tar.gz
initial commit for Enea Linux 4.0-140929daisy-140929
Migrated from the internal git server on the daisy-enea-point-release branch Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Diffstat (limited to 'meta-oe/recipes-benchmark/libhugetlbfs/files/add-PROT-NONE-to-the-mprotest-test.patch')
-rw-r--r--meta-oe/recipes-benchmark/libhugetlbfs/files/add-PROT-NONE-to-the-mprotest-test.patch38
1 files changed, 38 insertions, 0 deletions
diff --git a/meta-oe/recipes-benchmark/libhugetlbfs/files/add-PROT-NONE-to-the-mprotest-test.patch b/meta-oe/recipes-benchmark/libhugetlbfs/files/add-PROT-NONE-to-the-mprotest-test.patch
new file mode 100644
index 0000000000..673f2046dd
--- /dev/null
+++ b/meta-oe/recipes-benchmark/libhugetlbfs/files/add-PROT-NONE-to-the-mprotest-test.patch
@@ -0,0 +1,38 @@
1Upstream-Status: Pending
2
3From c7fcb7270bb510d7271a1c0cea095a4dbea49420 Mon Sep 17 00:00:00 2001
4From: Steve Capper <steve.capper@linaro.org>
5Date: Mon, 3 Jun 2013 17:00:45 +0100
6Subject: [PATCH] Add PROT_NONE to the mprotect test.
7
8The mprotect unit test checks PROT_READ and PROT_READ | PROT_WRITE
9protections. We recently found that PROT_NONE wasn't properly
10supported in our huge page kernel code.
11
12This patch adds PROT_NONE tests to mprotect. The expected behaviour
13is that neither reads nor writes should succeed.
14
15Signed-off-by: Steve Capper <steve.capper@linaro.org>
16---
17 tests/mprotect.c | 6 ++++++
18 1 file changed, 6 insertions(+)
19
20diff --git a/tests/mprotect.c b/tests/mprotect.c
21index aa4673e..db6a662 100644
22--- a/tests/mprotect.c
23+++ b/tests/mprotect.c
24@@ -213,5 +213,11 @@ int main(int argc, char *argv[])
25 test_mprotect(fd, "RW->R 1/2", 2*hpage_size, PROT_READ|PROT_WRITE,
26 hpage_size, PROT_READ);
27
28+ /* PROT_NONE tests */
29+ test_mprotect(fd, "NONE->R", hpage_size, PROT_NONE,
30+ hpage_size, PROT_READ);
31+ test_mprotect(fd, "NONE->RW", hpage_size, PROT_NONE,
32+ hpage_size, PROT_READ|PROT_WRITE);
33+
34 PASS();
35 }
36--
371.7.9.5
38