Skip to contentSkip to conversation

ppc64 shmget() translation bugfix

TRIVIAL David Gibson 1 participant 1 message Apr 30, 2004

lore
Share & tools
lore
#0 lore raw

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.

arch/ppc64/kernel/sys_ppc32.c +1 -1
Index: working-2.6/arch/ppc64/kernel/sys_ppc32.c
===================================================================
@@ -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));
Signature · 4 lines
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