public inbox for linux-crypto@vger.kernel.org
 help / color / mirror / Atom feed
From: Lukasz Stelmach <l.stelmach@samsung.com>
To: Herbert Xu <herbert@gondor.apana.org.au>,
	"David S. Miller" <davem@davemloft.net>,
	linux-crypto@vger.kernel.org
Subject: xor_blocks() assumptions
Date: Mon, 02 Jan 2023 23:44:35 +0100	[thread overview]
Message-ID: <dleftjk024o8to.fsf%l.stelmach@samsung.com> (raw)
In-Reply-To: CGME20230102224447eucas1p1dad1a2362030eee0d3890dd3546a1532@eucas1p1.samsung.com

[-- Attachment #1: Type: text/plain, Size: 810 bytes --]

Hi,

I am researching possibility to use xor_blocks() in crypto_xor() and
crypto_xor_cpy(). What I've found already is that different architecture
dependent xor functions work on different blocks between 16 and 512
(Intel AVX) bytes long. There is a hint in the comment for
async_xor_offs() that src_cnt (as passed to do_sync_xor_offs()) counts
pages. Thus, it is assumed, that the smallest chunk xor_blocks() gets is
a single page. Am I right?

Do you think adding block_len field to struct xor_block_template (and
maybe some information about required alignment) and using it to call
do_2 from crypto_xor() may work? I am thinking especially about disk
encryption where sectors of 512~4096 are handled.

Kind regards,
-- 
Łukasz Stelmach
Samsung R&D Institute Poland
Samsung Electronics

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

       reply	other threads:[~2023-01-02 22:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20230102224447eucas1p1dad1a2362030eee0d3890dd3546a1532@eucas1p1.samsung.com>
2023-01-02 22:44 ` Lukasz Stelmach [this message]
2023-01-02 23:03   ` xor_blocks() assumptions Eric Biggers
2023-01-03 11:13     ` Lukasz Stelmach
2023-01-03 14:01       ` Ard Biesheuvel
2023-01-04  7:46       ` Eric Biggers

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=dleftjk024o8to.fsf%l.stelmach@samsung.com \
    --to=l.stelmach@samsung.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox