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...
Unified · Split
| @@ -192,7 +192,7 @@ static int aout_core_dump(long signr, struct pt_regs *regs, struct file *file, · 191 unmodified lines | ||
| 192 | 192 | /* struct user */ |
| 193 | 193 | DUMP_WRITE(&dump, sizeof(dump)); |
| 194 | 194 | /* Now dump all of the user data. Include malloced stuff as well */ |
| 195 | − DUMP_SEEK(PAGE_SIZE); | |
| 195 | + DUMP_SEEK(PAGE_SIZE - sizeof(dump)); | |
| 196 | 196 | /* now we start writing out the user space info */ |
| 197 | 197 | set_fs(USER_DS); |
| 198 | 198 | /* Dump the data area */ |