From: Julian Seward Date: Tue, 31 May 2005 13:08:03 +0000 (+0000) Subject: At clone(), always start the child off with a copy of the parent's GDT. X-Git-Tag: svn/VALGRIND_3_0_0~495 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b4c2d97e48ef38a56f771753144f205d492920dc;p=thirdparty%2Fvalgrind.git At clone(), always start the child off with a copy of the parent's GDT. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3823 --- diff --git a/coregrind/m_syscalls/syscalls-x86-linux.c b/coregrind/m_syscalls/syscalls-x86-linux.c index ec8a255cf3..275829cd9e 100644 --- a/coregrind/m_syscalls/syscalls-x86-linux.c +++ b/coregrind/m_syscalls/syscalls-x86-linux.c @@ -412,7 +412,7 @@ static Int do_clone(ThreadId ptid, clone flags of 0xF00, and it seems to rely on the assumption that the child inherits a copy of the parent's GDT. Hence that is passed as an arg to setup_child. */ - setup_child( &ctst->arch, &ptst->arch, VG_(clo_support_elan3) ); + setup_child( &ctst->arch, &ptst->arch, True /*VG_(clo_support_elan3)*/ ); VGP_SET_SYSCALL_RESULT(ctst->arch, 0); if (esp != 0) @@ -1035,14 +1035,12 @@ PRE(sys_clone, Special) - The Quadrics Elan3 driver specifies clone flags of 0xF00. Everything else is rejected. */ - if (!VG_(clo_support_elan3) - && (cloneflags == 0x100011 || cloneflags == 0x1200011 - || cloneflags == 0x7D0F00)) { - /* OK */ - } - else - if (VG_(clo_support_elan3) && cloneflags == 0xF00) { - /* OK */ + if ( + (cloneflags == 0x100011 || cloneflags == 0x1200011 + || cloneflags == 0x7D0F00 + || cloneflags == 0xF00 + || cloneflags == 0xF21)) { + /* OK */ } else { /* Nah. We don't like it. Go away. */