Re: [RFC Part1 PATCH 11/13] x86/kernel: validate rom memory before accessing when SEV-SNP is active

2021-04-09 Thread Brijesh Singh
On 4/9/21 11:53 AM, Borislav Petkov wrote: > On Wed, Mar 24, 2021 at 11:44:22AM -0500, Brijesh Singh wrote: >> +/* >> + * The ROM memory is not part of the E820 system RAM and is not >> prevalidated by the BIOS. >> + * The kernel page table maps the ROM region as encrypted memory,

Re: [RFC Part1 PATCH 11/13] x86/kernel: validate rom memory before accessing when SEV-SNP is active

2021-04-09 Thread Borislav Petkov
On Wed, Mar 24, 2021 at 11:44:22AM -0500, Brijesh Singh wrote: > + /* > + * The ROM memory is not part of the E820 system RAM and is not > prevalidated by the BIOS. > + * The kernel page table maps the ROM region as encrypted memory, the > SEV-SNP requires > + * the all the

[RFC Part1 PATCH 11/13] x86/kernel: validate rom memory before accessing when SEV-SNP is active

2021-03-24 Thread Brijesh Singh
The probe_roms() access the memory range (0xc - 0x1) to probe various ROMs. The memory range is not part of the E820 system RAM range. The memory range is mapped as private (i.e encrypted) in page table. When SEV-SNP is active, all the private memory must be validated before the access.