Re: git: b9951017bab3 - main - amd64/fpu: Track supervisor state XSAVE components

From: John Baldwin <jhb_at_FreeBSD.org>
Date: Wed, 22 Jan 2025 15:40:03 UTC
On 1/22/25 07:59, Bojan Novković wrote:
> The branch main has been updated by bnovkov:
> 
> URL: https://cgit.FreeBSD.org/src/commit/?id=b9951017bab396e24042e85632e2cc34ee0329ff
> 
> commit b9951017bab396e24042e85632e2cc34ee0329ff
> Author:     Bojan Novković <bnovkov@FreeBSD.org>
> AuthorDate: 2025-01-15 16:41:24 +0000
> Commit:     Bojan Novković <bnovkov@FreeBSD.org>
> CommitDate: 2025-01-22 12:58:34 +0000
> 
>      amd64/fpu: Track supervisor state XSAVE components
>      
>      The amd64/fpu.c xsave_* routines track supported XSAVE components and
>      features. However, they only track supported user state components, and
>      there is currently no way for a consumer to check whether the CPU
>      supports a supervisor state component. Fix this by saving the supported
>      supervisor state components, enumerated by CPUID function 0DH,
>      sub-function 1, in a separate mask.
>      
>      Reviewed by:    kib
>      Differential Revision:  https://reviews.freebsd.org/D48466

Note that if we add support for supervisor state components we need to be careful
to scrub those components from the XSAVE state stored in process core dumps or
used with ptrace (e.g. zeroring those regions).  This is something Linux does.

-- 
John Baldwin