History

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...

Al Viro committed 13 years ago

Commit 945fb131 parent 7995bd21 file · +1 −1Browse files

Unified · Split

arch/x86/ia32/ia32_aout.c+1−1
@@ -192,7 +192,7 @@ static int aout_core_dump(long signr, struct pt_regs *regs, struct file *file, · 191 unmodified lines
192192 /* struct user */
193193 DUMP_WRITE(&dump, sizeof(dump));
194194 /* Now dump all of the user data. Include malloced stuff as well */
195− DUMP_SEEK(PAGE_SIZE);
195+ DUMP_SEEK(PAGE_SIZE - sizeof(dump));
196196 /* now we start writing out the user space info */
197197 set_fs(USER_DS);
198198 /* Dump the data area */