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: <e9c3a7c20901091639r3cd9bb64radb319691a5beee2@mail.gmail.com>
Date:	Fri, 9 Jan 2009 17:39:56 -0700
From:	"Dan Williams" <dan.j.williams@...el.com>
To:	"Atsushi Nemoto" <anemo@....ocn.ne.jp>
Cc:	haavard.skinnemoen@...el.com, linux-kernel@...r.kernel.org,
	maciej.sosnowski@...el.com, ralf@...ux-mips.org
Subject: Re: [PATCH] dmatest: flush and invalidate destination buffer before DMA

On Fri, Jan 9, 2009 at 1:30 AM, Atsushi Nemoto <anemo@....ocn.ne.jp> wrote:
> Do you mean something like this?

Yes, exactly.

>
>                dmatest_init_srcbuf(thread->srcbuf, src_off, len);
>                dmatest_init_dstbuf(thread->dstbuf, dst_off, len);
>
>                dma_src = dma_map_single(dev->dev, src + src_off, len,
>                         DMA_TO_DEVICE);
>                dma_dest = dma_map_single(dev->dev, dest_buf, test_buf_size,
>                        DMA_BIDIRECTIONAL);
>                tx = dev->device_prep_dma_memcpy(chan, dma_dest + dst_off,
>                                dma_src, len,
>                                DMA_CTRL_ACK | DMA_COMPL_SKIP_DEST_UNMAP);
>                if (!tx) {
>                        /* error */
>                }
>                tx->callback = NULL;
>                cookie = tx->tx_submit(tx);
>                ...
>                /* wait for completion */
>                ...
>                dma_unmap_single(dev->dev, dma_dest, test_buf_size,
>                        DMA_BIDIRECTIONAL);
>
> It will make dmatest more aggressive, for example, a option for
> testing DMA_PREP_INTERRUPT handling of a lowlevel driver can be added
> easily.
>

Yes, and it will also allow testing of corner cases like dependency
chains and other async_tx api driver-assumptions.

Thanks,
Dan
--
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