Re: [PATCH v7 4/5] efi: Load efi_secret module if EFI secret area is populated

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Feb 01, 2022 at 12:44:12PM +0000, Dov Murik wrote:
> If the efi_secret module is built, register a late_initcall in the EFI
> driver which checks whether the EFI secret area is available and
> populated, and then requests to load the efi_secret module.

> +	area = memremap(efi.coco_secret, sizeof(*area), MEMREMAP_WB);
> +	if (!area) {
> +		pr_err("Failed to map confidential computing secret area descriptor\n");
> +		return -ENOMEM;
> +	}
> +	if (!area->base_pa || area->size < sizeof(*header_guid))
> +		goto unmap_desc;
> +
> +	header_guid = (void __force *)ioremap_encrypted(area->base_pa, sizeof(*header_guid));
> +	if (!header_guid) {
> +		pr_err("Failed to map secret area\n");
> +		ret = -ENOMEM;
> +		goto unmap_desc;
> +	}
> +	if (efi_guidcmp(*header_guid, EFI_SECRET_TABLE_HEADER_GUID))
> +		goto unmap_encrypted;

Why these sanity checks are here and not in the efi_secret module?

take care,
  Gerd




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux