lkml.org 
[lkml]   [2021]   [May]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v5 15/28] x86/arch_prctl: Create ARCH_GET_XSTATE/ARCH_PUT_XSTATE
From
Date
On 5/25/21 10:27 AM, Borislav Petkov wrote:
> On Mon, May 24, 2021 at 07:10:57PM -0400, Len Brown wrote:
>> 1. CPUID has AMX
>> 2. XCR0 has AMX
>> 3. Linux permission has been requested and granted to this process
> Actually, you want *only* 3 as 1 is a bad idea - we're in this mess
> because userspace does feature detection on its own even when kernel
> support is needed.
>
> When Linux grants the permission, 1 and 2 should be implicitly given.

We did this for pkeys. Essentially, we said, "don't bother with
CPUID.OSPKE and XCRO[PKRU] checking". Just call alloc_pkey() and we'll
do the checking for you. One stop shopping.

So far, it's worked well.

\
 
 \ /
  Last update: 2021-05-25 19:34    [W:0.182 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site