mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Eric Biggers <ebiggers@kernel.org>
To: bot+bpf-ci@kernel.org
Cc: bpf@vger.kernel.org, vadim.fedorenko@linux.dev, ast@kernel.org,
	daniel@iogearbox.net, andrii@kernel.org, eddyz87@gmail.com,
	memxor@gmail.com, linux-crypto@vger.kernel.org,
	linux-kernel@vger.kernel.org, martin.lau@linux.dev,
	song@kernel.org, yonghong.song@linux.dev, jolsa@kernel.org,
	emil@etsalapatis.com, ihor.solodrai@linux.dev,
	john.fastabend@gmail.com, kmehltretter@gmail.com,
	martin.lau@kernel.org, mason@kernel.org
Subject: Re: [PATCH bpf-next v4] bpf: crypto: Use AES-CBC and AES-ECB libraries
Date: Tue, 22 Sep 2026 21:55:34 -0700	[thread overview]
Message-ID: <20260923045534.GD42709@sol> (raw)
In-Reply-To: <a5e07fdd93b0f6b38dfce4cf977e88eac653bed08ee713372bf31bc6cff349e7@mail.kernel.org>

On Wed, Sep 23, 2026 at 04:22:57AM +0000, bot+bpf-ci@kernel.org wrote:
> This isn't a bug, but struct aes_enckey pads itself so the round keys
> can be 16-byte aligned for better performance (as documented in
> include/crypto/aes.h). Putting the 4-byte algo enum before the key union
> means key.aes lands at offset 4, so the round keys can never hit that
> alignment. Would putting key first (or aligning it) be worth considering
> here?

Sure, but it's very much bikeshedding.  If someone cared about
performance enough to be micro-optimizing the data alignment here, they
would also have noticed than the optimized implementations of AES modes
aren't actually being used, which is way, *way* more important.
Coincidentally, I'm addressing that in a separate series
(https://lore.kernel.org/linux-crypto/20260921050910.296144-1-ebiggers@kernel.org/)...

I would not consider it worth worrying about the alignment here.

> This isn't a bug, but both helpers repeat the same src_len %
> AES_BLOCK_SIZE and dst_len < src_len checks. Could that validation stay
> in bpf_crypto_crypt() next to the existing length checks, leaving only
> the iv_len check per mode?

It's done the way it is because it makes it more straightforward to add
AES-GCM support, which is desired as per previous discussions.

Anyway, these random bpf-ci bot comments on every version are getting a
bit annoying.  Especially when it explicitly says "This isn't a bug",
and then the instructions at the end of the email assume it is.

- Eric

      reply	other threads:[~2026-09-23  4:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-23  3:27 Eric Biggers
2026-09-23  4:22 ` bot+bpf-ci
2026-09-23  4:55   ` Eric Biggers [this message]

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=20260923045534.GD42709@sol \
    --to=ebiggers@kernel.org \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bot+bpf-ci@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=eddyz87@gmail.com \
    --cc=emil@etsalapatis.com \
    --cc=ihor.solodrai@linux.dev \
    --cc=john.fastabend@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=kmehltretter@gmail.com \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martin.lau@kernel.org \
    --cc=martin.lau@linux.dev \
    --cc=mason@kernel.org \
    --cc=memxor@gmail.com \
    --cc=song@kernel.org \
    --cc=vadim.fedorenko@linux.dev \
    --cc=yonghong.song@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®