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

From: Andy Lutomirski
Date: Wed Apr 15 2020 - 21:07:24 EST


On Tue, Apr 14, 2020 at 5:10 PM Keno Fischer <keno@xxxxxxxxxxxxxxxxxx> wrote:
>
> > (why would you want to record with an unusual XCR0?)
>

Hmm. I don't personally have a strong objection to allowing XCR0 to
be overridden as long as it's done reasonably sanely. And maybe
requires a sysctl to be enabled.

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?