The mremap06 test relies on being able to move a mapping into the
unmapped space of an existing reservation (second call to mremap()
in do_test()). This is explicitly disallowed in PCuABI (for all
syscalls that can create mappings), and it is unclear if the
original bug can be reproduced if remapping to another adddress, so
let's just skip the test when running in purecap, at least for now.
Signed-off-by: Kevin Brodsky <kevin.brodsky(a)arm.com>
---
runtest/morello_transitional | 4 +++-
runtest/syscalls_morello_purecap_skip | 4 ++++
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/runtest/morello_transitional b/runtest/morello_transitional
index 702f62c0f42c..8d52fa1a2ec2 100644
--- a/runtest/morello_transitional
+++ b/runtest/morello_transitional
@@ -234,7 +234,9 @@ mremap02 mremap02
mremap03 mremap03
mremap04 mremap04
mremap05 mremap05
-mremap06 mremap06
+# This test is currently incompatible with the PCuABI specification
+# (mremap() into unmapped space in an existing reservation).
+#mremap06 mremap06
munmap01 munmap01
munmap02 munmap02
diff --git a/runtest/syscalls_morello_purecap_skip b/runtest/syscalls_morello_purecap_skip
index e4d66ee1b27f..4fa73ed9124c 100644
--- a/runtest/syscalls_morello_purecap_skip
+++ b/runtest/syscalls_morello_purecap_skip
@@ -6,3 +6,7 @@
process_vm_readv02
process_vm_readv03
process_vm_writev02
+
+# This test is currently incompatible with the PCuABI specification
+# (mremap() into unmapped space in an existing reservation).
+mremap06
--
2.43.0
The mremap06 test relies on being able to move a mapping into the
unmapped space of an existing reservation (second call to mremap()
in do_test()). This is explicitly disallowed in PCuABI (for all
syscalls that can create mappings), and it is unclear if the
original bug can be reproduced if remapping to another adddress, so
let's just skip the test in PCuABI.
Signed-off-by: Kevin Brodsky <kevin.brodsky(a)arm.com>
---
testcases/kernel/syscalls/mremap/mremap06.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/testcases/kernel/syscalls/mremap/mremap06.c b/testcases/kernel/syscalls/mremap/mremap06.c
index a19262750772..478840165cdc 100644
--- a/testcases/kernel/syscalls/mremap/mremap06.c
+++ b/testcases/kernel/syscalls/mremap/mremap06.c
@@ -96,6 +96,10 @@ static void setup(void)
{
int ret, i;
+#ifdef __CHERI_PURE_CAPABILITY__
+ tst_brk(TCONF, "Cannot test mremap() into unmapped space in purecap: not supported");
+#endif
+
page_size = getpagesize();
mmap_size = (NUM_PAGES+1) * page_size;
mremap_size = NUM_PAGES * page_size;
--
2.43.0
Hi,
This series fixes various issues in LTP that prevent tests from passing
when reservations / PCuABI address space management are implemented.
Patch 1-3 are generic, and arguably general improvements. The remainder
of the patches are PCuABI-specific, with appropriate #ifdef'ing where
necessary. The changes are meant to be backwards-compatible (e.g.
ERESERVATION is not assumed to be returned in PCuABI).
Review branch:
https://git.morello-project.org/kbrodsky-arm/morello-linux-ltp/-/commits/mo…
Thanks,
Kevin
Kevin Brodsky (10):
syscalls/munlock: Pass an appropriate length to munlock()
syscalls/m{,un}lock: Use mmap() to obtain an owning pointer
syscalls/m{,un}map: Pass a raw address when reusing an address range
syscalls: Use PROT_MAX() where needed
syscalls/mmap: Allow MREMAP_MAYMOVE in PCuABI
syscalls/mlock{,2}: Expect ERESERVATION on unmapped area
syscalls/mmap: Expect EINVAL on MAP_FIXED_NOREPLACE
syscalls/mprotect: Expect EINVAL on null pointer
syscalls/mremap: Expect EINVAL on narrow pointer
syscalls/mmap: Skip MAP_GROWSDOWN tests in PCuABI
.../syscalls/memfd_create/memfd_create_common.c | 3 ++-
testcases/kernel/syscalls/mlock/mlock01.c | 13 +++----------
testcases/kernel/syscalls/mlock/mlock02.c | 12 +++++++++++-
testcases/kernel/syscalls/mlock2/mlock202.c | 5 +++--
testcases/kernel/syscalls/mmap/mmap16.c | 11 +++++++++--
testcases/kernel/syscalls/mmap/mmap17.c | 4 ++++
testcases/kernel/syscalls/mmap/mmap18.c | 7 +++++++
testcases/kernel/syscalls/mmap/mmap19.c | 4 ++--
testcases/kernel/syscalls/mprotect/mprotect01.c | 11 +++++++++--
testcases/kernel/syscalls/mprotect/mprotect02.c | 3 ++-
testcases/kernel/syscalls/mprotect/mprotect04.c | 5 +++--
testcases/kernel/syscalls/mprotect/mprotect05.c | 4 +++-
testcases/kernel/syscalls/mremap/mremap03.c | 5 +++++
testcases/kernel/syscalls/mremap/mremap05.c | 4 +++-
testcases/kernel/syscalls/munlock/munlock01.c | 13 +++----------
testcases/kernel/syscalls/munlock/munlock02.c | 1 +
16 files changed, 70 insertions(+), 35 deletions(-)
--
2.43.0
Hi All,
The Morello LTP 1.8.0 integration drop is now available [1]
Main changes:
------------
- Merged upstream LTP 20230929 release
(see [2] for details)
- Number of small fixes aligning LTP testcases with capabilities and PCuABI
- Added support for capabilities to bpf testcases
Contributions:
-------------
Shout out to all the contributors and reviewers for all the work behind getting
the changes in, much appreciated!
git shortlog -s -e -n --invert-grep --grep="cherry" morello-release-1.7.0..
13 Kevin Brodsky <kevin.brodsky(a)arm.com>
5 Zachary Leaf <zachary.leaf(a)arm.com>
2 Teo Couprie Diaz <teo.coupriediaz(a)arm.com>
---
[1] https://git.morello-project.org/morello/morello-linux-ltp/-/tags/morello-re…
[2] https://github.com/linux-test-project/ltp/releases/tag/20230929