Commit 945fb136 authored by Al Viro's avatar Al Viro

aout32 coredump compat fix

dump_seek() does SEEK_CUR, not SEEK_SET; native binfmt_aout
handles it correctly (seeks by PAGE_SIZE - sizeof(struct user),
getting the current position to PAGE_SIZE), compat one seeks
by PAGE_SIZE and ends up at PAGE_SIZE + already written...
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 7995bd28
...@@ -192,7 +192,7 @@ static int aout_core_dump(long signr, struct pt_regs *regs, struct file *file, ...@@ -192,7 +192,7 @@ static int aout_core_dump(long signr, struct pt_regs *regs, struct file *file,
/* struct user */ /* struct user */
DUMP_WRITE(&dump, sizeof(dump)); DUMP_WRITE(&dump, sizeof(dump));
/* Now dump all of the user data. Include malloced stuff as well */ /* Now dump all of the user data. Include malloced stuff as well */
DUMP_SEEK(PAGE_SIZE); DUMP_SEEK(PAGE_SIZE - sizeof(dump));
/* now we start writing out the user space info */ /* now we start writing out the user space info */
set_fs(USER_DS); set_fs(USER_DS);
/* Dump the data area */ /* Dump the data area */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment