lkml.org 
[lkml]   [2021]   [Aug]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH Part1 RFC v4 15/36] x86/mm: Add support to validate memory when changing C-bit
From
Date
Hi Boris,


On 8/17/21 12:27 PM, Borislav Petkov wrote:

>
>> + /* Lets verify that reserved bit is not set in the header*/
>> + if (WARN(hdr->reserved, "Reserved bit is set in the PSC header\n"))
>
> psc_entry has a ->reserved field too and since we're iterating over the
> entries...
>


I am not seeing any strong reason to sanity check the reserved bit in
the psc_entry. The fields in the psc_entry are input from guest to the
hypervisor. The hypervisor cannot trick a guest by changing anything in
the psc_entry because guest does not read the hypervisor filled value. I
am okay with the psc_hdr because we need to read the current and end
entry after the PSC completes to determine whether it was successful and
sanity checking PSC header makes much more sense. Let me know if you are
okay with it ?

thanks

\
 
 \ /
  Last update: 2021-08-17 22:35    [W:0.087 / U:0.724 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site