From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42406) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bUdhD-0005Nb-1I for qemu-devel@nongnu.org; Tue, 02 Aug 2016 13:41:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bUdhB-0007zj-06 for qemu-devel@nongnu.org; Tue, 02 Aug 2016 13:41:38 -0400 Received: from orth.archaic.org.uk ([2001:8b0:1d0::2]:58519) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bUdhA-0007yI-PR for qemu-devel@nongnu.org; Tue, 02 Aug 2016 13:41:36 -0400 From: Peter Maydell Date: Tue, 2 Aug 2016 18:41:25 +0100 Message-Id: <1470159687-16428-1-git-send-email-peter.maydell@linaro.org> Subject: [Qemu-devel] [PATCH 0/2] linux-user: check clone flags for unsupported options List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Riku Voipio , patches@linaro.org This patchset adds checks on the flags passed to the clone syscall. Previously we weren't checking the flags at all for the clone case, which meant that some tests in the LTP testsuite would behave bizarrely because we let the clone syscall succeed but didn't provide the semantics requested by the flags. The patches add sanity checking so that we fail (EINVAL) any flags or flag-combinations which we can't support. (Sadly we can't just implement clone by passing directly through to the host syscall, because that would badly confuse libc, breaking mutexes, getpid(), etc. So we can only support things we can emulate via either fork() or pthread_create().) The first patch is a minor cleanup; the second has the meat. This is the last of the linux-user fixes I have on my plate for fixing up LTP issues. (There are a pile of other LTP failures but I don't think they're interesting enough to tackle until/unless we get bug reports about real world programs which have the same problems. I'll resend a summary report of remaining LTP failures when the last of the patches eventually hits master, ie after the 2.7 release.) I don't think this patchset really needs to go into 2.7. Git branch with this and all the rest at: https://git.linaro.org/people/peter.maydell/qemu-arm.git linux-fixes thanks -- PMM Peter Maydell (2): linux-user: Remove unnecessary nptl_flags variable from do_fork() linux-user: Sanity check clone flags linux-user/syscall.c | 82 ++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 70 insertions(+), 12 deletions(-) -- 1.9.1