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] [day] [month] [year] [list]
Message-ID: <9d8e5548-cb5e-ffd7-72e3-b65dbcf74938@amd.com>
Date:   Wed, 4 Jan 2023 11:30:14 +0530
From:   Rijo Thomas <Rijo-john.Thomas@....com>
To:     Herbert Xu <herbert@...dor.apana.org.au>
Cc:     Jeremi Piotrowski <jpiotrowski@...ux.microsoft.com>,
        Tom Lendacky <thomas.lendacky@....com>,
        John Allen <john.allen@....com>,
        "David S . Miller" <davem@...emloft.net>,
        Sumit Semwal <sumit.semwal@...aro.org>,
        Christian König <christian.koenig@....com>,
        linux-kernel@...r.kernel.org, linux-crypto@...r.kernel.org,
        linux-media@...r.kernel.org, dri-devel@...ts.freedesktop.org,
        linaro-mm-sig@...ts.linaro.org,
        Mythri PK <Mythri.Pandeshwarakrishna@....com>,
        Jeshwanth <JESHWANTHKUMAR.NK@....com>,
        Devaraj Rangasamy <Devaraj.Rangasamy@....com>,
        stable@...r.kernel.org, Jens Wiklander <jens.wiklander@...aro.org>
Subject: Re: [PATCH v2] crypto: ccp - Allocate TEE ring and cmd buffer using
 DMA APIs



On 12/30/2022 1:54 PM, Herbert Xu wrote:
> On Fri, Dec 23, 2022 at 05:45:24PM +0530, Rijo Thomas wrote:
>>
>>> dma_alloc_coherent memory is just as contiguous as __get_free_pages, and
>>> calling dma_alloc_coherent from a guest does not guarantee that the memory is
>>> contiguous in host memory either. The memory would look contiguous from the
>>> device point of view thanks to the IOMMU though (in both cases). So this is not
>>> about being contiguous but other properties that you might rely on (dma mask
>>> most likely, or coherent if you're not running this on x86?).
>>>
>>> Can you confirm why this fixes things and update the comment to reflect that.
>>
>> I see what you are saying.
>>
>> We verified this in Xen Dom0 PV guest, where dma_alloc_coherent() returned a memory
>> that is contiguous in machine address space, and the machine address was returned
>> in the dma handle (buf->dma).
> 
> So is this even relevant to the mainstream kernel or is this patch
> only needed for Xen Dom0?
> 
> Thanks,

Herbert,

This patch is no longer relevant to the mainstream kernel.

Thanks,
Rijo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ