Re: [PATCH x86/mm 4/6] x86-64 ptrace get/putreg current task

Christoph Hellwig
2007-11-29T17:39:59Z

On Wed, Nov 28, 2007 at 04:41:18PM -0800, Roland McGrath wrote:
>
> This generalizes the getreg and putreg functions so they can be used on the
> current task, as well as on a task stopped in TASK_TRACED and switched off.
> This lays the groundwork to share this code for all kinds of user-mode
> machine state access, not just ptrace.

Not sure it's a that good idea as it means almost every case now has
a branch for two entirely separate cases. Wouldn't it be better to have
a separate helper for the looking at the current proces case?

Either way support for looking at the current thread should only be
merged together with an actual user for that.