qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/2] linux-user: check clone flags for unsupported options
@ 2016-08-02 17:41 Peter Maydell
  2016-08-02 17:41 ` [Qemu-devel] [PATCH 1/2] linux-user: Remove unnecessary nptl_flags variable from do_fork() Peter Maydell
  2016-08-02 17:41 ` [Qemu-devel] [PATCH 2/2] linux-user: Sanity check clone flags Peter Maydell
  0 siblings, 2 replies; 3+ messages in thread
From: Peter Maydell @ 2016-08-02 17:41 UTC (permalink / raw)
  To: qemu-devel; +Cc: Riku Voipio, patches

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-08-02 17:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-02 17:41 [Qemu-devel] [PATCH 0/2] linux-user: check clone flags for unsupported options Peter Maydell
2016-08-02 17:41 ` [Qemu-devel] [PATCH 1/2] linux-user: Remove unnecessary nptl_flags variable from do_fork() Peter Maydell
2016-08-02 17:41 ` [Qemu-devel] [PATCH 2/2] linux-user: Sanity check clone flags Peter Maydell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).