Skip to content
This repository has been archived by the owner on Jan 20, 2022. It is now read-only.

[LibOS] Error out on anonymous shared mappings in mmap syscall #2147

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .ci/lib/stage-clean-check.jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ stage('clean-check') {
make -C Examples/memcached distclean
make -C Examples/redis distclean
make -C Examples/lighttpd distclean
make -C Examples/nginx distclean
make -C Examples/apache distclean
#make -C Examples/nginx distclean
#make -C Examples/apache distclean
make -C Examples/blender distclean
make -C Examples/r distclean
make -C Pal/src PAL_HOST=Skeleton clean
Expand Down
38 changes: 19 additions & 19 deletions .ci/lib/stage-test-direct.jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -79,25 +79,25 @@ stage('test-direct') {
LOOP=1 CONCURRENCY_LIST="1 32" ../common_tools/benchmark-http.sh 127.0.0.1:8003
'''
}
timeout(time: 10, unit: 'MINUTES') {
sh '''
cd Examples/nginx
make -j8 all
make start-graphene-server &
sleep 1
LOOP=1 CONCURRENCY_LIST="1 32" ../common_tools/benchmark-http.sh 127.0.0.1:8002
'''
}
timeout(time: 20, unit: 'MINUTES') {
sh '''
cd Examples/apache
make -j8 all
make start-graphene-server &
sleep 1
LOOP=1 CONCURRENCY_LIST="1 32" ../common_tools/benchmark-http.sh 127.0.0.1:8001
LOOP=1 CONCURRENCY_LIST="1 32" ../common_tools/benchmark-http.sh https://127.0.0.1:8443
'''
}
// timeout(time: 10, unit: 'MINUTES') {
// sh '''
// cd Examples/nginx
// make -j8 all
// make start-graphene-server &
// sleep 1
// LOOP=1 CONCURRENCY_LIST="1 32" ../common_tools/benchmark-http.sh 127.0.0.1:8002
// '''
// }
// timeout(time: 20, unit: 'MINUTES') {
// sh '''
// cd Examples/apache
// make -j8 all
// make start-graphene-server &
// sleep 1
// LOOP=1 CONCURRENCY_LIST="1 32" ../common_tools/benchmark-http.sh 127.0.0.1:8001
// LOOP=1 CONCURRENCY_LIST="1 32" ../common_tools/benchmark-http.sh https://127.0.0.1:8443
// '''
// }
timeout(time: 5, unit: 'MINUTES') {
sh '''
cd Examples/blender
Expand Down
38 changes: 19 additions & 19 deletions .ci/lib/stage-test-sgx.jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -72,25 +72,25 @@ stage('test-sgx') {
LOOP=1 CONCURRENCY_LIST="1 32" ../common_tools/benchmark-http.sh 127.0.0.1:8003
'''
}
timeout(time: 15, unit: 'MINUTES') {
sh '''
cd Examples/nginx
make ${MAKEOPTS}
make ${MAKEOPTS} start-graphene-server &
sleep 30
LOOP=1 CONCURRENCY_LIST="1 32" ../common_tools/benchmark-http.sh 127.0.0.1:8002
'''
}
timeout(time: 25, unit: 'MINUTES') {
sh '''
cd Examples/apache
make ${MAKEOPTS}
make ${MAKEOPTS} start-graphene-server &
sleep 30
LOOP=1 CONCURRENCY_LIST="1 32" ../common_tools/benchmark-http.sh 127.0.0.1:8001
LOOP=1 CONCURRENCY_LIST="1 32" ../common_tools/benchmark-http.sh https://127.0.0.1:8443
'''
}
// timeout(time: 15, unit: 'MINUTES') {
// sh '''
// cd Examples/nginx
// make ${MAKEOPTS}
// make ${MAKEOPTS} start-graphene-server &
// sleep 30
// LOOP=1 CONCURRENCY_LIST="1 32" ../common_tools/benchmark-http.sh 127.0.0.1:8002
// '''
// }
// timeout(time: 25, unit: 'MINUTES') {
// sh '''
// cd Examples/apache
// make ${MAKEOPTS}
// make ${MAKEOPTS} start-graphene-server &
// sleep 30
// LOOP=1 CONCURRENCY_LIST="1 32" ../common_tools/benchmark-http.sh 127.0.0.1:8001
// LOOP=1 CONCURRENCY_LIST="1 32" ../common_tools/benchmark-http.sh https://127.0.0.1:8443
// '''
// }
timeout(time: 5, unit: 'MINUTES') {
sh '''
cd Examples/blender
Expand Down
2 changes: 2 additions & 0 deletions LibOS/shim/src/sys/shim_mmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ void* shim_do_mmap(void* addr, size_t length, int prot, int flags, int fd, off_t
if (flags & MAP_ANONYMOUS) {
switch (flags & MAP_TYPE) {
case MAP_SHARED:
/* PAL API doesn't support anonymous shared memory. */
return (void*)-ENOSYS;
case MAP_PRIVATE:
break;
default:
Expand Down
4 changes: 4 additions & 0 deletions LibOS/shim/test/ltp/ltp.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -676,6 +676,10 @@ skip = yes
[futex_cmp_requeue01]
skip = yes

# uses anonymous shared mappings (which are not supported)
[futex_cmp_requeue02]
skip = yes

# always fails to open /proc/PID/stat, but the whole test fails only sometimes
[futex_wait02]
skip = yes
Expand Down