Skip to contentSkip to conversation

IA-32 emulation patch: msgctl.patch

Linux-ia64 Applied Arun Sharma 2 participants 3 messages May 23, 2003 – May 29, 2003

lore
Share & tools
lore
#0 lore raw

IA-32 programs executing:

msgctl(id, IPC_SET, &buf)

currently fail with EPERM due to this bug.

-Arun

<#part type="text/x-patch" filename="l:/Patches/IPF/ia32-lsb/msgctl.patch" disposition=attachment> <#/part>

#1 lore raw
Quoted 6 lines · Arun Sharma

IA-32 programs executing:

msgctl(id, IPC_SET, &buf)

currently fail with EPERM due to this bug.

My mailer ate the patch.

-Arun

arch/ia64/ia32/sys_ia32.c +9 -9
diff -burN linux/arch/ia64/ia32/sys_ia32.c linux-changed/arch/ia64/ia32/sys_ia32.c
@@ -2314,21 +2314,21 @@
 
 	      case IPC_SET:
 		if (version = IPC_64) {
-			err = get_user(m.msg_perm.uid, &up64->msg_perm.uid);
-			err |= get_user(m.msg_perm.gid, &up64->msg_perm.gid);
-			err |= get_user(m.msg_perm.mode, &up64->msg_perm.mode);
-			err |= get_user(m.msg_qbytes, &up64->msg_qbytes);
+			err = get_user(m64.msg_perm.uid, &up64->msg_perm.uid);
+			err |= get_user(m64.msg_perm.gid, &up64->msg_perm.gid);
+			err |= get_user(m64.msg_perm.mode, &up64->msg_perm.mode);
+			err |= get_user(m64.msg_qbytes, &up64->msg_qbytes);
 		} else {
-			err = get_user(m.msg_perm.uid, &up32->msg_perm.uid);
-			err |= get_user(m.msg_perm.gid, &up32->msg_perm.gid);
-			err |= get_user(m.msg_perm.mode, &up32->msg_perm.mode);
-			err |= get_user(m.msg_qbytes, &up32->msg_qbytes);
+			err = get_user(m64.msg_perm.uid, &up32->msg_perm.uid);
+			err |= get_user(m64.msg_perm.gid, &up32->msg_perm.gid);
+			err |= get_user(m64.msg_perm.mode, &up32->msg_perm.mode);
+			err |= get_user(m64.msg_qbytes, &up32->msg_qbytes);
 		}
 		if (err)
 			break;
 		old_fs = get_fs();
 		set_fs(KERNEL_DS);
-		err = sys_msgctl(first, second, &m);
+		err = sys_msgctl(first, second, &m64);
 		set_fs(old_fs);
 		break;"
 
#2 lore raw
In reply to Arun Sharma
Quoted 7 lines · Arun Sharma
Quoted 5 lines · Arun Sharma

IA-32 programs executing:

msgctl(id, IPC_SET, &buf)

currently fail with EPERM due to this bug.

I applied this for 2.4. Thanks!