public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [TRIVIAL] ppc64 shmget() translation bugfix
@ 2004-04-30  5:33 David Gibson
  0 siblings, 0 replies; only message in thread
From: David Gibson @ 2004-04-30  5:33 UTC (permalink / raw)
  To: Linus Torvalds, Andrew Morton
  Cc: Anton Blanchard, Paul Mackerras, linux-kernel, linuxppc64-dev,
	trivial

Linus, please apply:

The 32->64 bit syscall translation layer on ppc64 incorrectly
sign-extends rather than zero-extending the second parameter to
shmget(), which should be a size_t.  This means that it is impossible
to shmget() more 2GB or more from a 32-bit process.

Index: working-2.6/arch/ppc64/kernel/sys_ppc32.c
===================================================================
--- working-2.6.orig/arch/ppc64/kernel/sys_ppc32.c	2004-03-31 11:10:09.000000000 +1000
+++ working-2.6/arch/ppc64/kernel/sys_ppc32.c	2004-04-30 15:18:51.421878128 +1000
@@ -1666,7 +1666,7 @@
 		err = sys_shmdt((char *)AA(ptr));
 		break;
 	case SHMGET:
-		err = sys_shmget(first, second, third);
+		err = sys_shmget(first, second_parm, third);
 		break;
 	case SHMCTL:
 		err = do_sys32_shmctl(first, second, (void *)AA(ptr));



-- 
David Gibson			| For every complex problem there is a
david AT gibson.dropbear.id.au	| solution which is simple, neat and
				| wrong.
http://www.ozlabs.org/people/dgibson

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-04-30  5:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-04-30  5:33 [TRIVIAL] ppc64 shmget() translation bugfix David Gibson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox