summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/recipes-extended/ltp/ltp/0001-mmap15-mips64-return-EINVAL.patch41
-rw-r--r--meta/recipes-extended/ltp/ltp_20180515.bb1
2 files changed, 42 insertions, 0 deletions
diff --git a/meta/recipes-extended/ltp/ltp/0001-mmap15-mips64-return-EINVAL.patch b/meta/recipes-extended/ltp/ltp/0001-mmap15-mips64-return-EINVAL.patch
new file mode 100644
index 0000000000..18eba27c2d
--- /dev/null
+++ b/meta/recipes-extended/ltp/ltp/0001-mmap15-mips64-return-EINVAL.patch
@@ -0,0 +1,41 @@
1From b909805b4fc1b72e0ce299afb4abc02720ee81da Mon Sep 17 00:00:00 2001
2From: Dengke Du <dengke.du@windriver.com>
3Date: Wed, 12 Sep 2018 14:24:35 +0800
4Subject: [PATCH] mmap15: mips64 return EINVAL
5
6In mips64 kernel, system check the addr that passed to mmap:
7
8 if (TASK_SIZE - len < addr)
9 return -EINVAL;
10
11Link: https://github.com/torvalds/linux/blob/master/arch/mips/mm/mmap.c#L71
12
13Upstream-Status: Submitted [https://github.com/linux-test-project/ltp/pull/394]
14
15Signed-off-by: Dengke Du <dengke.du@windriver.com>
16---
17 testcases/kernel/syscalls/mmap/mmap15.c | 5 +++++
18 1 file changed, 5 insertions(+)
19
20diff --git a/testcases/kernel/syscalls/mmap/mmap15.c b/testcases/kernel/syscalls/mmap/mmap15.c
21index eff27d6..a10b5c7 100644
22--- a/testcases/kernel/syscalls/mmap/mmap15.c
23+++ b/testcases/kernel/syscalls/mmap/mmap15.c
24@@ -81,9 +81,14 @@ int main(int ac, char **av)
25 }
26
27 if (errno != ENOMEM) {
28+#ifdef __mips__
29+ tst_resm(TPASS | TERRNO, "mmap into high region "
30+ "failed as expected");
31+#else
32 tst_resm(TFAIL | TERRNO, "mmap into high region "
33 "failed unexpectedly - expect "
34 "errno=ENOMEM, got");
35+#endif
36 } else {
37 tst_resm(TPASS | TERRNO, "mmap into high region "
38 "failed as expected");
39--
402.7.4
41
diff --git a/meta/recipes-extended/ltp/ltp_20180515.bb b/meta/recipes-extended/ltp/ltp_20180515.bb
index 7c364a60a1..9cd3489722 100644
--- a/meta/recipes-extended/ltp/ltp_20180515.bb
+++ b/meta/recipes-extended/ltp/ltp_20180515.bb
@@ -31,6 +31,7 @@ CFLAGS_append_mipsarchn64 = " -D__SANE_USERSPACE_TYPES__"
31SRCREV = "96cbf48313afa65ef4d693d3441cbfd60a8d9b27" 31SRCREV = "96cbf48313afa65ef4d693d3441cbfd60a8d9b27"
32 32
33SRC_URI = "git://github.com/linux-test-project/ltp.git \ 33SRC_URI = "git://github.com/linux-test-project/ltp.git \
34 file://0001-mmap15-mips64-return-EINVAL.patch \
34 file://0004-build-Add-option-to-select-libc-implementation.patch \ 35 file://0004-build-Add-option-to-select-libc-implementation.patch \
35 file://0005-kernel-controllers-Link-with-libfts-explicitly-on-mu.patch \ 36 file://0005-kernel-controllers-Link-with-libfts-explicitly-on-mu.patch \
36 file://0007-fix-__WORDSIZE-undeclared-when-building-with-musl.patch \ 37 file://0007-fix-__WORDSIZE-undeclared-when-building-with-musl.patch \