RE: [PATCH] iommu/vt-d: Force to flush iotlb before creating superpage

2021-04-08 Thread Longpeng (Mike, Cloud Infrastructure Service Product Dept.)
Hi Baolu, > -Original Message- > From: Lu Baolu [mailto:baolu...@linux.intel.com] > Sent: Thursday, April 8, 2021 12:32 PM > To: Longpeng (Mike, Cloud Infrastructure Service Product Dept.) > ; io...@lists.linux-foundation.org; > linux-kernel@vger.kernel.org > Cc: bao

RE: [PATCH] iommu/vt-d: Force to flush iotlb before creating superpage

2021-04-07 Thread Longpeng (Mike, Cloud Infrastructure Service Product Dept.)
Hi Baolu, > -Original Message- > From: Lu Baolu [mailto:baolu...@linux.intel.com] > Sent: Friday, April 2, 2021 12:44 PM > To: Longpeng (Mike, Cloud Infrastructure Service Product Dept.) > ; io...@lists.linux-foundation.org; > linux-kernel@vger.kernel.org > Cc: bao

Re: [PATCH] iommu/vt-d: Force to flush iotlb before creating superpage

2021-04-01 Thread Longpeng (Mike, Cloud Infrastructure Service Product Dept.)
Hi Baolu, 在 2021/4/2 11:06, Lu Baolu 写道: > Hi Longpeng, > > On 4/1/21 3:18 PM, Longpeng(Mike) wrote: >> The translation caches may preserve obsolete data when the >> mapping size is changed, suppose the following sequence which >> can reveal the problem with high probability. >> >>

RE: A problem of Intel IOMMU hardware ?

2021-03-21 Thread Longpeng (Mike, Cloud Infrastructure Service Product Dept.)
> -Original Message- > From: Longpeng (Mike, Cloud Infrastructure Service Product Dept.) > Sent: Monday, March 22, 2021 7:51 AM > To: 'Nadav Amit' > Cc: Tian, Kevin ; chenjiashang > ; David Woodhouse ; > io...@lists.linux-foundation.org; LKML ; > alex.willia

RE: A problem of Intel IOMMU hardware ?

2021-03-21 Thread Longpeng (Mike, Cloud Infrastructure Service Product Dept.)
Hi Nadav, > -Original Message- > From: Nadav Amit [mailto:nadav.a...@gmail.com] > Sent: Friday, March 19, 2021 12:46 AM > To: Longpeng (Mike, Cloud Infrastructure Service Product Dept.) > > Cc: Tian, Kevin ; chenjiashang > ; David Woodhouse ; > io...@lists.li

RE: A problem of Intel IOMMU hardware ?

2021-03-18 Thread Longpeng (Mike, Cloud Infrastructure Service Product Dept.)
> -Original Message- > From: Tian, Kevin [mailto:kevin.t...@intel.com] > Sent: Thursday, March 18, 2021 4:56 PM > To: Longpeng (Mike, Cloud Infrastructure Service Product Dept.) > ; Nadav Amit > Cc: chenjiashang ; David Woodhouse > ; io...@lists.linux

RE: A problem of Intel IOMMU hardware ?

2021-03-18 Thread Longpeng (Mike, Cloud Infrastructure Service Product Dept.)
> -Original Message- > From: Tian, Kevin [mailto:kevin.t...@intel.com] > Sent: Thursday, March 18, 2021 4:43 PM > To: Longpeng (Mike, Cloud Infrastructure Service Product Dept.) > ; Nadav Amit > Cc: chenjiashang ; David Woodhouse > ; io...@lists.linux

RE: A problem of Intel IOMMU hardware ?

2021-03-18 Thread Longpeng (Mike, Cloud Infrastructure Service Product Dept.)
> -Original Message- > From: Tian, Kevin [mailto:kevin.t...@intel.com] > Sent: Thursday, March 18, 2021 4:27 PM > To: Longpeng (Mike, Cloud Infrastructure Service Product Dept.) > ; Nadav Amit > Cc: chenjiashang ; David Woodhouse > ; io...@lists.linux

RE: A problem of Intel IOMMU hardware ?

2021-03-18 Thread Longpeng (Mike, Cloud Infrastructure Service Product Dept.)
Hi Nadav, > -Original Message- > From: Nadav Amit [mailto:nadav.a...@gmail.com] > Sent: Thursday, March 18, 2021 2:13 AM > To: Longpeng (Mike, Cloud Infrastructure Service Product Dept.) > > Cc: David Woodhouse ; Lu Baolu > ; Joerg Roedel ; w...@kernel.org; > al

RE: A problem of Intel IOMMU hardware ?

2021-03-17 Thread Longpeng (Mike, Cloud Infrastructure Service Product Dept.)
Hi guys, I provide more information, please see below > -Original Message- > From: Lu Baolu [mailto:baolu...@linux.intel.com] > Sent: Thursday, March 18, 2021 10:59 AM > To: Alex Williamson > Cc: baolu...@linux.intel.com; Longpeng (Mike, Cloud Infrastructure Service &

RE: A problem of Intel IOMMU hardware ?

2021-03-17 Thread Longpeng (Mike, Cloud Infrastructure Service Product Dept.)
Hi Baolu, > -Original Message- > From: Lu Baolu [mailto:baolu...@linux.intel.com] > Sent: Wednesday, March 17, 2021 1:17 PM > To: Longpeng (Mike, Cloud Infrastructure Service Product Dept.) > ; dw...@infradead.org; j...@8bytes.org; > w...@kernel.org; alex.william...@redh

RE: A problem of Intel IOMMU hardware ?

2021-03-17 Thread Longpeng (Mike, Cloud Infrastructure Service Product Dept.)
Hi Nadav, > -Original Message- > From: Nadav Amit [mailto:nadav.a...@gmail.com] > Sent: Wednesday, March 17, 2021 1:46 PM > To: Longpeng (Mike, Cloud Infrastructure Service Product Dept.) > > Cc: David Woodhouse ; Lu Baolu > ; Joerg Roedel ; w...@kernel.org; > al

A problem of Intel IOMMU hardware ?

2021-03-16 Thread Longpeng (Mike, Cloud Infrastructure Service Product Dept.)
Hi guys, We find the Intel iommu cache (i.e. iotlb) maybe works wrong in a special situation, it would cause DMA fails or get wrong data. The reproducer (based on Alex's vfio testsuite[1]) is in attachment, it can reproduce the problem with high probability (~50%). The machine we used is:

Re: [PATCH] nitro_enclaves: set master in the procedure of NE probe

2021-01-24 Thread Longpeng (Mike, Cloud Infrastructure Service Product Dept.)
在 2021/1/20 18:27, Paraschiv, Andra-Irina 写道: > > > On 19/01/2021 05:30, Longpeng(Mike) wrote: >> According the PCI spec: >>    Bus Master Enable – Controls the ability of a PCI Express >>    Endpoint to issue Memory and I/O Read/Write Requests, and >>    the ability of a Root or Switch Port

Re: [PATCH v3 1/3] crypto: virtio: Fix src/dst scatterlist calculation in __virtio_crypto_skcipher_do_req()

2020-06-10 Thread Longpeng (Mike, Cloud Infrastructure Service Product Dept.)
On 2020/6/5 22:10, Sasha Levin wrote: > <20200123101000.GB24255@Red> > References: <20200602070501.2023-2-longpe...@huawei.com> > <20200123101000.GB24255@Red> > > Hi > > [This is an automated email] > > This commit has been processed because it contains a "Fixes:" tag > fixing commit:

Re: [PATCH v2 2/2] crypto: virtio: Fix use-after-free in virtio_crypto_skcipher_finalize_req()

2020-06-01 Thread Longpeng (Mike, Cloud Infrastructure Service Product Dept.)
On 2020/5/31 17:21, Michael S. Tsirkin wrote: > On Tue, May 26, 2020 at 02:11:37PM +, Sasha Levin wrote: >> <20200123101000.GB24255@Red> >> References: <20200526031956.1897-3-longpe...@huawei.com> >> <20200123101000.GB24255@Red> >> >> Hi >> >> [This is an automated email] >> >> This commit

Re: [v2 2/2] crypto: virtio: Fix use-after-free in virtio_crypto_skcipher_finalize_req()

2020-05-26 Thread Longpeng (Mike, Cloud Infrastructure Service Product Dept.)
On 2020/5/26 17:01, Markus Elfring wrote: … Thus release specific resources before >>> >>> Is there a need to improve also this information another bit? >>> >> You mean the last two paragraph is redundant ? > > No. > > I became curious if you would like to choose a more helpful

Re: [PATCH v2 2/2] crypto: virtio: Fix use-after-free in virtio_crypto_skcipher_finalize_req()

2020-05-26 Thread Longpeng (Mike, Cloud Infrastructure Service Product Dept.)
Hi Markus, On 2020/5/26 15:19, Markus Elfring wrote: >> The system'll crash when the users insmod crypto/tcrypto.ko with mode=155 >> ( testing "authenc(hmac(sha1),cbc(aes))" ). It's caused by reuse the memory >> of request structure. > > Wording adjustments: > * … system will crash … > * … It is

Re: [PATCH v2 1/2] crypto: virtio: Fix src/dst scatterlist calculation in __virtio_crypto_skcipher_do_req()

2020-05-26 Thread Longpeng (Mike, Cloud Infrastructure Service Product Dept.)
Hi Markus, On 2020/5/26 15:03, Markus Elfring wrote: >> Fix it by sg_next() on calculation of src/dst scatterlist. > > Wording adjustment: > … by calling the function “sg_next” … > OK, thanks. > > … >> +++ b/drivers/crypto/virtio/virtio_crypto_algs.c >> @@ -350,13 +350,18 @@

Re: [2/2] crypto: virtio: Fix use-after-free in virtio_crypto_skcipher_finalize_req()

2020-05-25 Thread Longpeng (Mike, Cloud Infrastructure Service Product Dept.)
On 2020/5/25 15:36, Markus Elfring wrote: >> Could you help me to make the sentence better? > > How do you think about a wording variant like the following? > > So the system will crash when this memory will be used again. > Uh, it's much better, thanks. > >>> * You proposed to move a

Re: [PATCH 2/2] crypto: virtio: Fix use-after-free in virtio_crypto_skcipher_finalize_req()

2020-05-25 Thread Longpeng (Mike, Cloud Infrastructure Service Product Dept.)
Hi Markus, On 2020/5/25 14:30, Markus Elfring wrote: >> … So the system will crash >> at last when this memory be used again. > > I would prefer a wording with less typos here. > Could you help me to make the sentence better? > >> We can free the resources before calling ->complete to fix

Re: [PATCH 1/2] crypto: virtio: Fix src/dst scatterlist calculation in __virtio_crypto_skcipher_do_req()

2020-05-25 Thread Longpeng (Mike, Cloud Infrastructure Service Product Dept.)
Hi Markus, On 2020/5/25 14:05, Markus Elfring wrote: >> The system will crash when we insmod crypto/tcrypt.ko whit mode=38. > > * I suggest to use the word “with” in this sentence. > OK, it's a typo. > * Will it be helpful to explain the passed mode number? > > >> BTW I add a check for

Re: [PATCH 1/2] crypto: virtio: fix src/dst scatterlist calculation

2020-05-24 Thread Longpeng (Mike, Cloud Infrastructure Service Product Dept.)
Hi Jason, On 2020/5/25 11:12, Jason Wang wrote: > > On 2020/5/25 上午8:56, Longpeng(Mike) wrote: >> The system will crash when we insmod crypto/tcrypt.ko whit mode=38. >> >> Usually the next entry of one sg will be @sg@ + 1, but if this sg element >> is part of a chained scatterlist, it could jump