Skip to contentSkip to conversation

binfmt_flat: missing argv table

PATCH In review Yoshinori Sato 2 participants 3 messages Jun 15, 2011 – Jun 17, 2011

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 binfmt_flat: missing argv table

"put_user" is multiple times evalute on argument
(in asm-generic/uaccess.h).
So this code building argv table include gabage.

fs/binfmt_flat.c +1 -1
index 811384b..127a198 100644
@@ -144,7 +144,7 @@ static unsigned long create_flat_tables(
 	put_user(argc, sp);
 	current->mm->arg_start = (unsigned long) p;
 	while (argc-->0) {
-		put_user((unsigned long) p, argv++);
+		put_user((unsigned long) p, argv); argv++;
 		do {
 			get_user(dummy, p); p++;
 		} while (dummy);
Signature · 2 lines
Yoshinori Sato
<[email protected]>
#1 lore raw
Quoted 3 lines · Yoshinori Sato

"put_user" is multiple times evalute on argument
(in asm-generic/uaccess.h).
So this code building argv table include gabage.

NAK. asm-generic/uaccess.h is broken. i posted some fixes some time ago to lkml for the header to clean it all up, but it had some minor build warnings that needed to be addressed.

if you want to actually fix this issue, please start with my patch and get the issues around it resolved:
asm-generic: uaccess: do not expand args multiple times
-mike

#2 lore raw

At Wed, 15 Jun 2011 11:52:33 -0400,

Quoted 6 lines · Mike Frysinger
Quoted 3 lines · Yoshinori Sato

"put_user" is multiple times evalute on argument
(in asm-generic/uaccess.h).
So this code building argv table include gabage.

Quoted 8 lines

NAK. asm-generic/uaccess.h is broken. i posted some fixes some time ago to lkml for the header to clean it all up, but it had some minor build warnings that needed to be addressed.

if you want to actually fix this issue, please start with my patch and get the issues around it resolved:
asm-generic: uaccess: do not expand args multiple times
-mike

OK.
I found it. and trying cleanup.

Signature · 2 lines
Yoshinori Sato
<[email protected]>