[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v15 00/12] Restricted DMA
- To: Claire Chang <tientzu@xxxxxxxxxxxx>
- From: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
- Date: Thu, 24 Jun 2021 15:19:48 -0400
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=P8+6fQKt1GcJiNjuEjUVT8DwDaU9l6qyoErT2/2fhEo=; b=Cshqzkx1kSkYTdieScYtwuU9XYvSgltLRPgvqkm3ZBoVSbGYTAYM5qdWlrwvkT/mspLR05MBNFoGz90ikfF/o/uoaF0/Eesq/Xm5Puf03B/hjAot7s6Lge/vvuFHHqTa2s4illm5NLGJ+NLAFv7nzjkfJt1GA5mL1y5yCNmODo8AKrfZMMgzjG2iCOB2Kt70LnEPvNLJHbxqic952W1o6t7HGBjryKCAJD6yiJ/KAftlNRXLHAYBbQwU6GEyt1I+QLhfOZkDdVHwKGSfrYx6g3uNXjLWyM6BREfD6BHHy6s7qtMPkL3Opw/zDHY1RHzRrLCo4BJRtF9YLXheO5/4Fw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VpXMUxGbaQ9Xui1oyOBNhR0FlQrJsdrtDWMytIAHuioZMgW6zJlsv0RQ7Zyy0ipuGwV0EUoaBtpPPrGQUVhU1CLMwCc9Bm8NqLTCV7tGBbpMKTFW5SUdcmi3ileOSoHTnlrahWvP/PpcvPQ/WFhlq+5wfRP9HRB/tNFpZ4AODVejGA9Qxl8rH6/fmzV648vSQp0wun865YcsPwpsymd8TQBbwmJi20B1Pp7gt0UP1UXNTYXU7rhhoYl5uLLKeSQFQQBZV1J8tjezI7kk2zII34EuwGHr/4/yuq293og361XsZByELl0pIX7r0XIXUGcPXoH8mQvOFxB7+8kh/lDqug==
- Authentication-results: chromium.org; dkim=none (message not signed) header.d=none;chromium.org; dmarc=none action=none header.from=oracle.com;
- Cc: Rob Herring <robh+dt@xxxxxxxxxx>, mpe@xxxxxxxxxxxxxx, Joerg Roedel <joro@xxxxxxxxxx>, Will Deacon <will@xxxxxxxxxx>, Frank Rowand <frowand.list@xxxxxxxxx>, boris.ostrovsky@xxxxxxxxxx, jgross@xxxxxxxx, Christoph Hellwig <hch@xxxxxx>, Marek Szyprowski <m.szyprowski@xxxxxxxxxxx>, benh@xxxxxxxxxxxxxxxxxxx, paulus@xxxxxxxxx, "list@xxxxxxx:IOMMU DRIVERS" <iommu@xxxxxxxxxxxxxxxxxxxxxxxxxx>, sstabellini@xxxxxxxxxx, Robin Murphy <robin.murphy@xxxxxxx>, grant.likely@xxxxxxx, xypron.glpk@xxxxxx, Thierry Reding <treding@xxxxxxxxxx>, mingo@xxxxxxxxxx, bauerman@xxxxxxxxxxxxx, peterz@xxxxxxxxxxxxx, Greg KH <gregkh@xxxxxxxxxxxxxxxxxxx>, Saravana Kannan <saravanak@xxxxxxxxxx>, "Rafael J . Wysocki" <rafael.j.wysocki@xxxxxxxxx>, heikki.krogerus@xxxxxxxxxxxxxxx, Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>, Randy Dunlap <rdunlap@xxxxxxxxxxxxx>, Dan Williams <dan.j.williams@xxxxxxxxx>, Bartosz Golaszewski <bgolaszewski@xxxxxxxxxxxx>, linux-devicetree <devicetree@xxxxxxxxxxxxxxx>, lkml <linux-kernel@xxxxxxxxxxxxxxx>, linuxppc-dev@xxxxxxxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx, Nicolas Boichat <drinkcat@xxxxxxxxxxxx>, Jim Quinlan <james.quinlan@xxxxxxxxxxxx>, tfiga@xxxxxxxxxxxx, bskeggs@xxxxxxxxxx, bhelgaas@xxxxxxxxxx, chris@xxxxxxxxxxxxxxxxxx, daniel@xxxxxxxx, airlied@xxxxxxxx, dri-devel@xxxxxxxxxxxxxxxxxxxxx, intel-gfx@xxxxxxxxxxxxxxxxxxxxx, jani.nikula@xxxxxxxxxxxxxxx, jxgao@xxxxxxxxxx, joonas.lahtinen@xxxxxxxxxxxxxxx, linux-pci@xxxxxxxxxxxxxxx, maarten.lankhorst@xxxxxxxxxxxxxxx, matthew.auld@xxxxxxxxx, rodrigo.vivi@xxxxxxxxx, thomas.hellstrom@xxxxxxxxxxxxxxx, thomas.lendacky@xxxxxxx, quic_qiancai@xxxxxxxxxxx
- Delivery-date: Thu, 24 Jun 2021 19:21:19 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On Thu, Jun 24, 2021 at 11:55:14PM +0800, Claire Chang wrote:
> This series implements mitigations for lack of DMA access control on
> systems without an IOMMU, which could result in the DMA accessing the
> system memory at unexpected times and/or unexpected addresses, possibly
> leading to data leakage or corruption.
>
> For example, we plan to use the PCI-e bus for Wi-Fi and that PCI-e bus is
> not behind an IOMMU. As PCI-e, by design, gives the device full access to
> system memory, a vulnerability in the Wi-Fi firmware could easily escalate
> to a full system exploit (remote wifi exploits: [1a], [1b] that shows a
> full chain of exploits; [2], [3]).
>
> To mitigate the security concerns, we introduce restricted DMA. Restricted
> DMA utilizes the existing swiotlb to bounce streaming DMA in and out of a
> specially allocated region and does memory allocation from the same region.
> The feature on its own provides a basic level of protection against the DMA
> overwriting buffer contents at unexpected times. However, to protect
> against general data leakage and system memory corruption, the system needs
> to provide a way to restrict the DMA to a predefined memory region (this is
> usually done at firmware level, e.g. MPU in ATF on some ARM platforms [4]).
>
> [1a]
> https://googleprojectzero.blogspot.com/2017/04/over-air-exploiting-broadcoms-wi-fi_4.html
> [1b]
> https://googleprojectzero.blogspot.com/2017/04/over-air-exploiting-broadcoms-wi-fi_11.html
> [2] https://blade.tencent.com/en/advisories/qualpwn/
> [3]
> https://www.bleepingcomputer.com/news/security/vulnerabilities-found-in-highly-popular-firmware-for-wifi-chips/
> [4]
> https://github.com/ARM-software/arm-trusted-firmware/blob/master/plat/mediatek/mt8183/drivers/emi_mpu/emi_mpu.c#L132
>
> v15:
> - Apply Will's diff (https://lore.kernel.org/patchwork/patch/1448957/#1647521)
> to fix the crash reported by Qian.
> - Add Stefano's Acked-by tag for patch 01/12 from v14
That all should be now be on
https://git.kernel.org/pub/scm/linux/kernel/git/konrad/swiotlb.git/
devel/for-linus-5.14 (and linux-next)
|