diff options
author | Tudor Florea <tudor.florea@enea.com> | 2014-10-10 03:20:04 +0200 |
---|---|---|
committer | Tudor Florea <tudor.florea@enea.com> | 2014-10-10 03:20:04 +0200 |
commit | 1b8dfe266937a37a4c642f96ceb2347bf4c00a17 (patch) | |
tree | 0c6aab146bb3c82efd9c7846a9a4e70dcb0ec84f /meta-oe/recipes-benchmark/libhugetlbfs/files/add-PROT-NONE-to-the-mprotest-test.patch | |
download | meta-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.patch | 38 |
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 @@ | |||
1 | Upstream-Status: Pending | ||
2 | |||
3 | From c7fcb7270bb510d7271a1c0cea095a4dbea49420 Mon Sep 17 00:00:00 2001 | ||
4 | From: Steve Capper <steve.capper@linaro.org> | ||
5 | Date: Mon, 3 Jun 2013 17:00:45 +0100 | ||
6 | Subject: [PATCH] Add PROT_NONE to the mprotect test. | ||
7 | |||
8 | The mprotect unit test checks PROT_READ and PROT_READ | PROT_WRITE | ||
9 | protections. We recently found that PROT_NONE wasn't properly | ||
10 | supported in our huge page kernel code. | ||
11 | |||
12 | This patch adds PROT_NONE tests to mprotect. The expected behaviour | ||
13 | is that neither reads nor writes should succeed. | ||
14 | |||
15 | Signed-off-by: Steve Capper <steve.capper@linaro.org> | ||
16 | --- | ||
17 | tests/mprotect.c | 6 ++++++ | ||
18 | 1 file changed, 6 insertions(+) | ||
19 | |||
20 | diff --git a/tests/mprotect.c b/tests/mprotect.c | ||
21 | index 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 | -- | ||
37 | 1.7.9.5 | ||
38 | |||