Re: [PATCH v7 12/26] x86/fpu/xstate: Use feature disable (XFD) to protect dynamic user state

From: Bae, Chang Seok
Date: Sat Jul 17 2021 - 11:48:07 EST


On Jul 13, 2021, at 12:13, Macieira, Thiago <thiago.macieira@xxxxxxxxx> wrote:
> On Saturday, 10 July 2021 06:02:59 PDT Chang S. Bae wrote:
>>
>> + /* Raise a signal when it failed to handle.
>> */ + if (err)
>> + force_sig(SIGSEGV);
>> + }
>> + return;
>
> Can I make a suggestion that you send a different signal than SIGSEGV for the
> failure of unauthorised instructions? I would recommend SIGILL. Additionally,
> please consider a new ILL_* constant for the si_code field.

Applied on v8 [1].

> On the same topic, is there a way to save this state in a core dump? The FS
> and GS bases would also be very handy.

According to [2],
“Exporting the extended register state through ptrace and core-dump
(NT_X86_XSTATE note) interfaces will be same"

Also, AMX state was found as I retrieved from my core-dump image.

Thanks,
Chang

[1] https://lore.kernel.org/lkml/20210717152903.7651-13-chang.seok.bae@xxxxxxxxx/
[2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/x86/include/asm/user.h#n26