All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Van Leeuwen, Pascal" <pvanleeuwen@rambus.com>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: "linux-crypto@vger.kernel.org" <linux-crypto@vger.kernel.org>,
	"antoine.tenart@bootlin.com" <antoine.tenart@bootlin.com>,
	"davem@davemloft.net" <davem@davemloft.net>,
	Ard Biesheuvel <ardb@kernel.org>
Subject: RE: [PATCH] crypto: inside-secure - Fix corruption on not fully coherent systems
Date: Fri, 18 Sep 2020 08:21:44 +0000	[thread overview]
Message-ID: <CY4PR0401MB365268AA17E35E5B55ABF7E6C33F0@CY4PR0401MB3652.namprd04.prod.outlook.com> (raw)
In-Reply-To: <20200918080127.GA24222@gondor.apana.org.au>

> -----Original Message-----
> From: Herbert Xu <herbert@gondor.apana.org.au>
> Sent: Friday, September 18, 2020 10:01 AM
> To: Van Leeuwen, Pascal <pvanleeuwen@rambus.com>
> Cc: linux-crypto@vger.kernel.org; antoine.tenart@bootlin.com; davem@davemloft.net; Ard Biesheuvel <ardb@kernel.org>
> Subject: Re: [PATCH] crypto: inside-secure - Fix corruption on not fully coherent systems
>
> <<< External Email >>>
> On Fri, Sep 18, 2020 at 07:42:35AM +0000, Van Leeuwen, Pascal wrote:
> >
> > Actually, that is what we did as a _quick hack_ initially, but:
> >
> > First of all, it's not only about the L1 cacheline size. It's about the worst case cache
> > line size in the path all the way from the CPU to the actual memory interface.
> >
> > Second, cache line sizes may differ from system to system. So it's not actually
> > a constant at all (unless you compile the driver specifically for 1 target system).
>
> Can this alignment exceed ARCH_DMA_MINALIGN? If not then the
> macro CRYPTO_MINALIGN should cover it.
>
I don't know. I'm not familiar with that macro and I have not been able to dig up any
clear description on what it should convey.

Based on the name, I might be inclined to think yes, but based on many definitions
I've seen in header files, I would say no. Because it's often just an alias for the L1
cacheline size, which may not be the largest cacheline for _some_ systems.

In any case, aligning to the worst cache cacheline for a CPU architecture may mean
you end up wasting a lot of space on a system with a much smaller cacheline.

> Cheers,
> --
> Email: Herbert Xu <herbert@gondor.apana.org.au>
> Home Page: http://gondor.apana.org.au/~herbert/
> PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Regards,
Pascal van Leeuwen
Silicon IP Architect Multi-Protocol Engines, Rambus Security
Rambus ROTW Holding BV
+31-73 6581953

Note: The Inside Secure/Verimatrix Silicon IP team was recently acquired by Rambus.
Please be so kind to update your e-mail address book with my new e-mail address.


** This message and any attachments are for the sole use of the intended recipient(s). It may contain information that is confidential and privileged. If you are not the intended recipient of this message, you are prohibited from printing, copying, forwarding or saving it. Please delete the message and attachments and notify the sender immediately. **

Rambus Inc.<http://www.rambus.com>

  reply	other threads:[~2020-09-18  8:21 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-07  8:19 [PATCH] crypto: inside-secure - Fix corruption on not fully coherent systems Pascal van Leeuwen
2020-09-18  6:58 ` Herbert Xu
2020-09-18  7:42   ` Van Leeuwen, Pascal
2020-09-18  8:01     ` Herbert Xu
2020-09-18  8:21       ` Van Leeuwen, Pascal [this message]
2020-09-24  3:11         ` Herbert Xu
2020-09-24  8:08           ` Van Leeuwen, Pascal
2020-09-24 12:35             ` Herbert Xu
2020-09-24 12:51               ` Van Leeuwen, Pascal
2020-09-24 12:58                 ` Herbert Xu

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=CY4PR0401MB365268AA17E35E5B55ABF7E6C33F0@CY4PR0401MB3652.namprd04.prod.outlook.com \
    --to=pvanleeuwen@rambus.com \
    --cc=antoine.tenart@bootlin.com \
    --cc=ardb@kernel.org \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    /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.