Re: [PATCH v1] m68k: save extra registers on sys_exit and sys_exit_group syscall entry

Linus Torvalds
2021-06-13T19:59:41Z

On Sat, Jun 12, 2021 at 4:38 PM Michael Schmitz <schmitzmic@gmail.com> wrote:
>
> do_exit() calls prace_stop() which may require access to all saved
> registers. We only save those registers not preserved by C code
> currently.
>
> Provide a special syscall entry for exit and exit_group syscalls
> similar to that used by clone and clone3, which have the same
> requirements.

ACK, this looks correct to me.

It might be a good idea to generate a test-case for this - some
"ptrace child, catch exit of it, show registers" kind of thing - just
to show what the effects of the bug was (and to show it's fixed). But
maybe it's not worth the effort.

Linus