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]
Message-ID: <CAPcyv4gQiZJLbYwsmL9WxB8KjGAdsz=AaAmOyL=M5yhPQaP48A@mail.gmail.com>
Date:	Wed, 20 May 2015 09:03:04 -0700
From:	Dan Williams <dan.j.williams@...el.com>
To:	Vinod Koul <vinod.koul@...el.com>
Cc:	"hch@....de" <hch@....de>, "axboe@...com" <axboe@...com>,
	"mingo@...nel.org" <mingo@...nel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"j.glisse@...il.com" <j.glisse@...il.com>,
	"axboe@...nel.dk" <axboe@...nel.dk>,
	"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
	"riel@...hat.com" <riel@...hat.com>,
	"linux-nvdimm@...ts.01.org" <linux-nvdimm@...1.01.org>,
	"dmaengine@...r.kernel.org" <dmaengine@...r.kernel.org>,
	"willy@...ux.intel.com" <willy@...ux.intel.com>,
	"linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>,
	"mgorman@...e.de" <mgorman@...e.de>,
	"linux-arch@...r.kernel.org" <linux-arch@...r.kernel.org>,
	"david@...morbit.com" <david@...morbit.com>
Subject: Re: [PATCH v3 06/11] scatterlist: support "page-less" (__pfn_t only) entries

On Mon, May 18, 2015 at 9:10 PM, Vinod Koul <vinod.koul@...el.com> wrote:
> On Wed, May 13, 2015 at 06:35:55PM +0000, Williams, Dan J wrote:
>> [ adding willy (yes, need to fix my scripts), and dmaengine folks]
>>
>> Jens, Christoph,
>>
>> I've rebased this patch series block/for-next.  With commit 84be456f883c
>> "remove <asm/scatterlist.h>" I think we can take the next step of
>> removing all references to page_link and just use __pfn_t by default.
>> v4 patch below.
>>
>> Jens, I'm wondering if you want to take this series(.) as patches or
>> prepare a git branch to pull?
>>
>
>> diff --git a/drivers/crypto/omap-sham.c b/drivers/crypto/omap-sham.c
>> index 4d63e0d4da9a..21736afd3320 100644
>> --- a/drivers/crypto/omap-sham.c
>> +++ b/drivers/crypto/omap-sham.c
>> @@ -582,7 +582,7 @@ static int omap_sham_xmit_dma(struct omap_sham_dev *dd, dma_addr_t dma_addr,
>>                * the dmaengine may try to DMA the incorrect amount of data.
>>                */
>>               sg_init_table(&ctx->sgl, 1);
>> -             ctx->sgl.page_link = ctx->sg->page_link;
>> +             ctx->sgl.pfn = ctx->sg->pfn;
> Do you want drivers to tinker with internals of sg, I think driver should be
> agnostic here, perhpas a helper to get pfn, sg_get_pfn()

Hmm, we have sg_page() seems like we also need an sg_pfn().  Thanks, will fix.

>
>>               ctx->sgl.offset = ctx->sg->offset;
>>               sg_dma_len(&ctx->sgl) = len32;
>>               sg_dma_address(&ctx->sgl) = sg_dma_address(ctx->sg);
>> diff --git a/drivers/dma/imx-dma.c b/drivers/dma/imx-dma.c
>> index eed405976ea9..a767727bcfef 100644
>> --- a/drivers/dma/imx-dma.c
>> +++ b/drivers/dma/imx-dma.c
>> @@ -886,7 +886,7 @@ static struct dma_async_tx_descriptor *imxdma_prep_dma_cyclic(
>>       sg_init_table(imxdmac->sg_list, periods);
>>
>>       for (i = 0; i < periods; i++) {
>> -             imxdmac->sg_list[i].page_link = 0;
>> +             imxdmac->sg_list[i].pfn.page = NULL;
> same here, sg_set_pfn_page() ?

sg_set_page() would work here.

>
>>               imxdmac->sg_list[i].offset = 0;
>>               imxdmac->sg_list[i].dma_address = dma_addr;
>>               sg_dma_len(&imxdmac->sg_list[i]) = period_len;
>> @@ -894,10 +894,7 @@ static struct dma_async_tx_descriptor *imxdma_prep_dma_cyclic(
>>       }
>>
>>       /* close the loop */
>> -     imxdmac->sg_list[periods].offset = 0;
>> -     sg_dma_len(&imxdmac->sg_list[periods]) = 0;
>> -     imxdmac->sg_list[periods].page_link =
>> -             ((unsigned long)imxdmac->sg_list | 0x01) & ~0x02;
>> +     sg_chain(imxdmac->sg_list, periods + 1, imxdmac->sg_list);
> This looks right...
>

Cool, thanks for taking a look.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ