Re: [PATCH 2/3] AF_ALG: Drop support for off-CPU cryptography
Richard Weinberger <[email protected]> Sat, 25 Jul 2026 22:55:03 +0200
| Newsgroups | org.kernel.vger.io-uring,org.kernel.vger.linux-crypto,org.kernel.vger.linux-doc,org.kernel.vger.linux-kernel,org.kernel.vger.linux-perf-users,org.kernel.vger.linux-s390,org.kernel.vger.netdev |
|---|---|
| Message-ID | <CAFLxGvy+ec3nQLrQtwFZgGELhT2pKBDnHdD0pMvEGh-Mf3rjgQ@mail.gmail.com> |
On Fri, Jul 24, 2026 at 6:41 PM Dominique Martinet <[email protected]> wrote: > > There's no "tk(cbc(aes))" algorithm in the upstream kernel. So, it's > > not possible that this ever worked with upstream. Given that, there's > > no regression in upstream for this program, and it wouldn't be > > appropriate to consider a sysctl knob in upstream at this time. > > Bleh, you are correct, it's an NXP patch in > drivers/crypto/caam/caamalg.c that they've been carrying in their > tree(s) since 2018[1] and has apparently never been upstreamed... > [1] https://github.com/nxp-imx/linux-imx/commit/6868c9e49c1854028fb46022daac3b1b10ca2c70 > > Sorry for not having checked, I was hoping for better. > (I should be used to it by now...) Sorry for joining the party so late, you're killing AF_ALG faster than I can follow all the mails. Speaking of CAAM, there is a legit usecase which exists mainline. No vendor patches needed. You can create a CAAM BLOB (a generated and sealed key) using the trusted keys subsystem and use this BLOB later in AF_ALG to perform AES with a key invisible to userspace. e.g. kid=$(keyctl add trusted mykey "new 32 pk" @s) keyctl print $kid | xxd -r -p > blob.bin Then just create a caam_pkey_info in userspace and feed it into AF_ALG and perform AES with it. So, pretty please, if you kill AF_ALG and all this, offer some way to achieve the same in userspace. - Thanks, //richard