Re: [RFC PATCH v2] x86/arch_prctl: Add ARCH_SET_XCR0 to set XCR0 per-thread

From: Keno Fischer
Date: Wed Apr 15 2020 - 21:19:56 EST


On Wed, Apr 15, 2020 at 9:14 PM Keno Fischer <keno@xxxxxxxxxxxxxxxxxx> wrote:
>
> > Would it make matters easier if tasks with nonstandard XCR0 were not
> > allowed to use ptrace() at all? And if ARCH_SET_XCR0 were disallowed
> > if the caller is tracing anyone?
>
> That would be fine by me (as long as you're still allowed to ptrace them of
> course).

Sorry, I realized after I had hit send that this wording may not be clear.
What I meant was that it would need to be able to have an external ptracer
(with unmodified XCR0) attach to the task, even if it had modified its XCR0.
I don't think you were suggesting that that wouldn't be possible,
but I just wanted to make sure.