linux-user: do setrlimit selectively
commit5dfa88f7162f390463b227940e84a23af5407744
authorMax Filippov <jcmvbkbc@gmail.com>
Mon, 17 Sep 2018 18:13:14 +0000 (17 11:13 -0700)
committerLaurent Vivier <laurent@vivier.eu>
Tue, 25 Sep 2018 20:36:49 +0000 (25 22:36 +0200)
tree4cac8b67ae543ad0723c94dd48c9d8c088bf98f7
parent58cfa6c2e6eb51b23cc98f81d16136b3ca929b31
linux-user: do setrlimit selectively

setrlimit guest calls that affect memory resources
(RLIMIT_{AS,DATA,STACK}) may interfere with QEMU internal memory
management. They may result in QEMU lockup because mprotect call in
page_unprotect would fail with ENOMEM error code, causing infinite loop
of SIGSEGV. E.g. it happens when running libstdc++ testsuite for xtensa
target on x86_64 host.

Don't call host setrlimit for memory-related resources.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Message-Id: <20180917181314.22551-1-jcmvbkbc@gmail.com>
[lv: rebase on master]
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
linux-user/syscall.c