Andi Kleen <[EMAIL PROTECTED]> wrote on 10.02.2005 10:21:59: > > Andrew Morton <[EMAIL PROTECTED]> schrieb am 09.02.2005, 23:50:37: > > > Martin Schwidefsky wrote: > > > > > > > > [patch] Fix shmget for ppc64, s390-64 & sparc64. > > > > > > OK, but Andi's patch fixed mips and x86_64 as well, but only for > > > compat_shmget and not for sys_msgsnd and sys_msgrcv. > > > > mips, x86_64, ia64 and parisc always got this right, they are not > > using sys_ipc in 64 bit mode. The rest is 32 bit only, so the fix > > is not needed either. > > Sorry, someone is confused here. > > The patch was explicitely to fix the 32bit emulation. The problem was > reported on x86-64 for a 32bit program.
Yes sure. Arnd has been taking about the native 64 bit ipc system calls, not the 32 bit emulation. > The 32bit emulation layer for sys_ipc() would incorrectly sign extend the > passed shared memory size when converting the argument to the native > sys_shmget() > > I think you need it even for s390 - even though you don't have more than > 2GB someone could still pass a bigger size and then get the wrong > errno. Well, it certainly doesn't break anything to have the correct sign extension but I still think it not needed. If the sign bit is set the value gets converted into something HUGE. If it is only a little bit too big or way too big doesn't matter. blue skies, Martin Martin Schwidefsky Linux for zSeries Development & Services IBM Deutschland Entwicklung GmbH
