Re: [PATCH 1/2] alpha/ptrace: Record and handle the absence of switch_stack

From: Linus Torvalds
Date: Wed Jun 16 2021 - 16:01:13 EST


On Wed, Jun 16, 2021 at 11:32 AM Eric W. Biederman
<ebiederm@xxxxxxxxxxxx> wrote:
>
> Prevent security holes by recording when all of the registers are
> available so generic code changes do not result in security holes
> on alpha.

Please no, not this way. ldl/stc is extremely expensive on some alpha cpus.

I really think thatTIF_ALLREGS_SAVED bit isn't worth it, except
perhaps for debugging.

And even for debugging, I think it would be both easier and cheaper to
just add a magic word to the entry stack instead.

Linus