From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MEW7b-0004mh-NM for qemu-devel@nongnu.org; Wed, 10 Jun 2009 18:18:15 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MEW7Y-0004lD-1Y for qemu-devel@nongnu.org; Wed, 10 Jun 2009 18:18:15 -0400 Received: from [199.232.76.173] (port=52269 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MEW7X-0004l8-OR for qemu-devel@nongnu.org; Wed, 10 Jun 2009 18:18:11 -0400 Received: from moutng.kundenserver.de ([212.227.126.171]:56116) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MEW7X-0001Bp-8s for qemu-devel@nongnu.org; Wed, 10 Jun 2009 18:18:11 -0400 Subject: Re: [Qemu-devel] [PATCH] linux-user: shmctl() should ignore IPC_64 From: Laurent Vivier In-Reply-To: <20090610214102.GA23525@kos.to> References: <1243895557-18462-1-git-send-email-laurent@vivier.eu> <20090610214102.GA23525@kos.to> Content-Type: text/plain; charset=utf-8 Date: Thu, 11 Jun 2009 00:18:08 +0200 Message-Id: <1244672288.5770.1.camel@Quad> Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Riku Voipio Cc: qemu-devel@nongnu.org Le jeudi 11 juin 2009 =C3=A0 00:41 +0300, Riku Voipio a =C3=A9crit : > On Tue, Jun 02, 2009 at 12:32:37AM +0200, Laurent Vivier wrote: > > This has been detected trying to use "dbench" with m68k-linux-user/qemu= -m68k where > > "shmctl()" is called with "IPC_RMID | IPC_64". > >=20 > > IPC_64 is useless with IPC_RMID, SHM_LOCK, SHM_UNLOCK > > (as the only parameter is the id without shmid_ds) and > > already ignored with semctl() and msgctl(). > >=20 > > Signed-off-by: Laurent Vivier > > --- > > linux-user/syscall.c | 4 ++-- > > 1 files changed, 2 insertions(+), 2 deletions(-) > >=20 > > diff --git a/linux-user/syscall.c b/linux-user/syscall.c > > index b1bba48..c3d1d73 100644 > > --- a/linux-user/syscall.c > > +++ b/linux-user/syscall.c > > @@ -2539,11 +2539,11 @@ static abi_long do_ipc(unsigned int call, int f= irst, > > =20 > > /* IPC_* and SHM_* command values are the same on all linux platforms= */ > > case IPCOP_shmctl: > > - switch(second) { > > + switch(second & 0xff) { >=20 > This appears to be also taken care in this old patch > where shmctl was moved to do_shmctl() >=20 > https://git.maemo.org/projects/qemu/gitweb?p=3Dqemu;a=3Dcommitdiff;h=3Dd1= f365ccd0615c57d2869d33fb5e0637b3623b64 Why it is not in qemu original git tree ? >=20 > > case IPC_RMID: > > case SHM_LOCK: > > case SHM_UNLOCK: > > - ret =3D get_errno(shmctl(first, second, NULL)); > > + ret =3D get_errno(shmctl(first, second & 0xff, NULL)); > > break; > > default: > > goto unimplemented; > > --=20 If no patch to solve this is applied soon, I will resend mine... :-P Regards, Laurent --=20 --------------------- laurent@vivier.eu ---------------------- "Tout ce qui est impossible reste =C3=A0 accomplir" Jules Verne "Things are only impossible until they're not" Jean-Luc Picard