lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 16 Dec 2019 11:07:16 -0800
From:   "Chen, Yian" <yian.chen@...el.com>
To:     Barret Rhoden <brho@...gle.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
        "H. Peter Anvin" <hpa@...or.com>,
        David Woodhouse <dwmw2@...radead.org>,
        Joerg Roedel <joro@...tes.org>,
        Sohil Mehta <sohil.mehta@...el.com>
Cc:     linux-kernel@...r.kernel.org, iommu@...ts.linux-foundation.org,
        x86@...nel.org
Subject: Re: [PATCH 1/3] iommu/vt-d: skip RMRR entries that fail the sanity
 check



On 12/11/2019 11:46 AM, Barret Rhoden wrote:
> RMRR entries describe memory regions that are DMA targets for devices
> outside the kernel's control.
>
> RMRR entries that fail the sanity check are pointing to regions of
> memory that the firmware did not tell the kernel are reserved or
> otherwise should not be used.
>
> Instead of aborting DMAR processing, this commit skips these RMRR
> entries.  They will not be mapped into the IOMMU, but the IOMMU can
> still be utilized.  If anything, when the IOMMU is on, those devices
> will not be able to clobber RAM that the kernel has allocated from those
> regions.
>
> Signed-off-by: Barret Rhoden <brho@...gle.com>
> ---
>   drivers/iommu/intel-iommu.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c
> index f168cd8ee570..f7e09244c9e4 100644
> --- a/drivers/iommu/intel-iommu.c
> +++ b/drivers/iommu/intel-iommu.c
> @@ -4316,7 +4316,7 @@ int __init dmar_parse_one_rmrr(struct acpi_dmar_header *header, void *arg)
>   	rmrr = (struct acpi_dmar_reserved_memory *)header;
>   	ret = arch_rmrr_sanity_check(rmrr);
>   	if (ret)
> -		return ret;
> +		return 0;
>   
>   	rmrru = kzalloc(sizeof(*rmrru), GFP_KERNEL);
>   	if (!rmrru)
Parsing rmrr function should report the error to caller. The behavior to 
response the error can be
choseĀ  by the caller in the calling stack, for example, 
dmar_walk_remapping_entries().
A concern is that ignoring a detected firmware bug might have a 
potential side impact though
it seemed safe for your case.

Thanks,
Yian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ