From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:42362) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QWtJp-0007kx-Gp for qemu-devel@nongnu.org; Wed, 15 Jun 2011 12:51:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QWtJn-00035s-BJ for qemu-devel@nongnu.org; Wed, 15 Jun 2011 12:51:53 -0400 Received: from mail-pv0-f173.google.com ([74.125.83.173]:59518) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QWtJm-00035b-T7 for qemu-devel@nongnu.org; Wed, 15 Jun 2011 12:51:51 -0400 Received: by pvg3 with SMTP id 3so480767pvg.4 for ; Wed, 15 Jun 2011 09:51:48 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <95538E92-0A9C-4464-BFE6-F44E528AB6FA@suse.de> References: <95538E92-0A9C-4464-BFE6-F44E528AB6FA@suse.de> Date: Wed, 15 Jun 2011 17:51:48 +0100 Message-ID: From: Peter Maydell Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 10/10] linux-user: remove unused variables List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf Cc: Kevin Wolf , Anthony Liguori , Riku Voipio , Stefan Hajnoczi , kvm@vger.kernel.org, "Michael S.Tsirkin" , Jan Kiszka , Paul Brook , Marcelo Tosatti , qemu-devel@nongnu.org, Blue Swirl , Isaku Yamahata , Alex Williamson , Gerd Hoffmann , Paolo Bonzini , Avi Kivity , Christoph Hellwig , Aurelien Jarno , Richard Henderson On 15 June 2011 09:35, Alexander Graf wrote: > > On 14.06.2011, at 19:36, Michael S. Tsirkin wrote: >> =C2=A0 =C2=A0 return 0; >> @@ -7058,18 +7056,14 @@ abi_long do_syscall(void *cpu_env, int num, abi_= long arg1, >> =C2=A0 =C2=A0 case TARGET_NR_osf_sigprocmask: >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 { >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 abi_ulong mask; >> - =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0int how =3D arg1; >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 sigset_t set, oldset; >> >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 switch(arg1) { >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 case TARGET_SIG_BLOCK: >> - =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0how =3D SIG_BLO= CK; >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 break; >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 case TARGET_SIG_UNBLOCK: >> - =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0how =3D SIG_UNB= LOCK; >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 break; >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 case TARGET_SIG_SETMASK: >> - =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0how =3D SIG_SET= MASK; > > why go through the effort of setting "how" and then not using it? I'm pre= tty sure this is a bug as well. A few lines down is the following code: > > =C2=A0 sigprocmask(arg1, &set, &oldset); > > which in TARGET_NR_sigprocmask would be: > > =C2=A0ret =3D get_errno(sigprocmask(how, &set, &oldset)); > > So we end up sending guest masks to the host. Yes, this change is wrong. We've had a better version of these fixes posted to the list already by Juan: http://patchwork.ozlabs.org/patch/98376/ at least some of which have already been reviewed. -- PMM