All of lore.kernel.org
 help / color / mirror / Atom feed
From: LABBE Corentin <clabbe@baylibre.com>
To: Christoph Hellwig <hch@lst.de>
Cc: Ben Dooks <ben.dooks@codethink.co.uk>,
	herbert@gondor.apana.org.au, heiko@sntech.de,
	linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-riscv@lists.infradead.org, linux-sunxi@lists.linux.dev
Subject: Re: [RFC PATCH] crypto: flush poison data
Date: Wed, 6 Jul 2022 09:25:50 +0200	[thread overview]
Message-ID: <YsU4/qrnxG8yjFwC@Red> (raw)
In-Reply-To: <20220705175834.GA15815@lst.de>

Le Tue, Jul 05, 2022 at 07:58:34PM +0200, Christoph Hellwig a écrit :
> On Tue, Jul 05, 2022 at 07:56:11PM +0200, LABBE Corentin wrote:
> > My problem is that a dma_sync on the data buffer corrupt the poison buffer as collateral dommage.
> > Probably because the sync operate on a larger region than the requested dma_sync length.
> > So I try to flush poison data in the cryptoAPI.
> 
> Data structures that are DMAed to must be aligned to
> the value returned by dma_get_cache_alignment(), as non-coherent DMA
> by definition can disturb the data inside that boundary.  That is not
> a bug but fundamentally part of how DMA works when the device attachment
> is not cache coherent.

I am sorry but I dont see how this can help my problem.

WARNING: multiple messages have this Message-ID (diff)
From: LABBE Corentin <clabbe@baylibre.com>
To: Christoph Hellwig <hch@lst.de>
Cc: Ben Dooks <ben.dooks@codethink.co.uk>,
	herbert@gondor.apana.org.au, heiko@sntech.de,
	linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-riscv@lists.infradead.org, linux-sunxi@lists.linux.dev
Subject: Re: [RFC PATCH] crypto: flush poison data
Date: Wed, 6 Jul 2022 09:25:50 +0200	[thread overview]
Message-ID: <YsU4/qrnxG8yjFwC@Red> (raw)
In-Reply-To: <20220705175834.GA15815@lst.de>

Le Tue, Jul 05, 2022 at 07:58:34PM +0200, Christoph Hellwig a écrit :
> On Tue, Jul 05, 2022 at 07:56:11PM +0200, LABBE Corentin wrote:
> > My problem is that a dma_sync on the data buffer corrupt the poison buffer as collateral dommage.
> > Probably because the sync operate on a larger region than the requested dma_sync length.
> > So I try to flush poison data in the cryptoAPI.
> 
> Data structures that are DMAed to must be aligned to
> the value returned by dma_get_cache_alignment(), as non-coherent DMA
> by definition can disturb the data inside that boundary.  That is not
> a bug but fundamentally part of how DMA works when the device attachment
> is not cache coherent.

I am sorry but I dont see how this can help my problem.

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

  reply	other threads:[~2022-07-06  7:25 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-01 13:27 [RFC PATCH] crypto: flush poison data Corentin Labbe
2022-07-01 13:27 ` Corentin Labbe
2022-07-01 13:35 ` Ben Dooks
2022-07-01 13:35   ` Ben Dooks
2022-07-05  8:21   ` LABBE Corentin
2022-07-05  8:21     ` LABBE Corentin
2022-07-05 16:42     ` Christoph Hellwig
2022-07-05 16:42       ` Christoph Hellwig
2022-07-05 17:56       ` LABBE Corentin
2022-07-05 17:56         ` LABBE Corentin
2022-07-05 17:58         ` Christoph Hellwig
2022-07-05 17:58           ` Christoph Hellwig
2022-07-06  7:25           ` LABBE Corentin [this message]
2022-07-06  7:25             ` LABBE Corentin
2022-07-06  9:47       ` Ben Dooks
2022-07-06  9:47         ` Ben Dooks
2022-07-06 11:58         ` Christoph Hellwig
2022-07-06 11:58           ` Christoph Hellwig
2022-07-06 12:23           ` LABBE Corentin
2022-07-06 12:23             ` LABBE Corentin
2022-07-01 14:36 ` Andre Przywara
2022-07-01 14:36   ` Andre Przywara
2022-07-01 14:55   ` LABBE Corentin
2022-07-01 14:55     ` LABBE Corentin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YsU4/qrnxG8yjFwC@Red \
    --to=clabbe@baylibre.com \
    --cc=ben.dooks@codethink.co.uk \
    --cc=hch@lst.de \
    --cc=heiko@sntech.de \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=linux-sunxi@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.