get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/2183196/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 2183196,
    "url": "http://patchwork.ozlabs.org/api/patches/2183196/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/20260112192035.10427-25-ebiggers@kernel.org/",
    "project": {
        "id": 2,
        "url": "http://patchwork.ozlabs.org/api/projects/2/?format=api",
        "name": "Linux PPC development",
        "link_name": "linuxppc-dev",
        "list_id": "linuxppc-dev.lists.ozlabs.org",
        "list_email": "linuxppc-dev@lists.ozlabs.org",
        "web_url": "https://github.com/linuxppc/wiki/wiki",
        "scm_url": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git",
        "webscm_url": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/",
        "list_archive_url": "https://lore.kernel.org/linuxppc-dev/",
        "list_archive_url_format": "https://lore.kernel.org/linuxppc-dev/{}/",
        "commit_url_format": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/commit/?id={}"
    },
    "msgid": "<20260112192035.10427-25-ebiggers@kernel.org>",
    "list_archive_url": "https://lore.kernel.org/linuxppc-dev/20260112192035.10427-25-ebiggers@kernel.org/",
    "date": "2026-01-12T19:20:22",
    "name": "[v2,24/35] crypto: arm64/ghash - Use new AES library API",
    "commit_ref": null,
    "pull_url": null,
    "state": "handled-elsewhere",
    "archived": false,
    "hash": "daad2c73fc40f9d0c77115ce15c6ca4ded6f63ef",
    "submitter": {
        "id": 74690,
        "url": "http://patchwork.ozlabs.org/api/people/74690/?format=api",
        "name": "Eric Biggers",
        "email": "ebiggers@kernel.org"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/20260112192035.10427-25-ebiggers@kernel.org/mbox/",
    "series": [
        {
            "id": 488089,
            "url": "http://patchwork.ozlabs.org/api/series/488089/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/linuxppc-dev/list/?series=488089",
            "date": "2026-01-12T19:19:58",
            "name": "AES library improvements",
            "version": 2,
            "mbox": "http://patchwork.ozlabs.org/series/488089/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2183196/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2183196/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "\n <linuxppc-dev+bounces-15564-incoming=patchwork.ozlabs.org@lists.ozlabs.org>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "linuxppc-dev@lists.ozlabs.org"
        ],
        "Delivered-To": "patchwork-incoming@legolas.ozlabs.org",
        "Authentication-Results": [
            "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256\n header.s=k20201202 header.b=DyrNjcdd;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org\n (client-ip=112.213.38.117; helo=lists.ozlabs.org;\n envelope-from=linuxppc-dev+bounces-15564-incoming=patchwork.ozlabs.org@lists.ozlabs.org;\n receiver=patchwork.ozlabs.org)",
            "lists.ozlabs.org;\n arc=none smtp.remote-ip=172.234.252.31",
            "lists.ozlabs.org;\n dmarc=pass (p=quarantine dis=none) header.from=kernel.org",
            "lists.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256\n header.s=k20201202 header.b=DyrNjcdd;\n\tdkim-atps=neutral",
            "lists.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=kernel.org\n (client-ip=172.234.252.31; helo=sea.source.kernel.org;\n envelope-from=ebiggers@kernel.org; receiver=lists.ozlabs.org)"
        ],
        "Received": [
            "from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4dqj4f1DxYz1xpk\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 13 Jan 2026 06:24:50 +1100 (AEDT)",
            "from boromir.ozlabs.org (localhost [127.0.0.1])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 4dqj3941RDz2ywS;\n\tTue, 13 Jan 2026 06:23:33 +1100 (AEDT)",
            "from sea.source.kernel.org (sea.source.kernel.org [172.234.252.31])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 4dqj385fcYz2yvc\n\tfor <linuxppc-dev@lists.ozlabs.org>; Tue, 13 Jan 2026 06:23:32 +1100 (AEDT)",
            "from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58])\n\tby sea.source.kernel.org (Postfix) with ESMTP id 421E7443B9;\n\tMon, 12 Jan 2026 19:23:31 +0000 (UTC)",
            "by smtp.kernel.org (Postfix) with ESMTPSA id B2F1FC2BC9E;\n\tMon, 12 Jan 2026 19:23:30 +0000 (UTC)"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1768245813;\n\tcv=none;\n b=nLI3k6qyyd9O0OgC5D+IMH/ZF+5+ov/VKFQwYpUDmoItkOs0VOK4qCc0nNIK8THxFR968f1V9AZIbKi+12l2ridojLF4d1NRdSALaQcenO0QrSneTwjdA/5apxtO7Wl9VcjlFEqd1Hseq7HKQNpKe+KYaOzJSVnlpDGG5NBMX1HY7pyOS1PRsafmA59XKY0r848u7dY/anv0iWPucO/xFmaJKK2dD6jbtjVMxyCSqVucwGaDXANjDAH9+PggJbHxrodsQj94rqx4z0i13nmOn+kOsycf8F8s9T+s+vcWvDXO/gAYnqpVCsFLyqIMXRTnuYFQCjr+CHlE/b27iPryyA==",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707;\n\tt=1768245813; c=relaxed/relaxed;\n\tbh=ICZSjMFk0SjcBFAmmlWUMyBPpemD7Dx+XsaO5ZLfxfk=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version;\n b=AoP2WnexkQiVQOkKeAXVIK5WAzgbVMcISwxqCp7S3L7F8hbG+2yJV7JS2palKmfnhQS03YqjCeJwgs4ADKwSxuSe4h9oBzPJ67jbvzMEOMVMfh7+ZyGbZEdt8zG1wy3UmWvJwAj1Ley62Utlr0HaQ3DR83sMh/DWMafKQ92Ed+gOuioWVVYkKlOcZMY+EyNGjvOE/HEKu+T1hxsUcwgX8eClubx3GsIbY6mvJeiFHeptaPzQeWzXV00nOZ2KLX94HyEh3C8aEaco9s4tTumFkSNdyUA0fMgWCZPsTBlvMhNYphH+UWMmmZeuEpOSPfOdDiz2COnWL5Q/8O4oCC+eAw==",
        "ARC-Authentication-Results": "i=1; lists.ozlabs.org;\n dmarc=pass (p=quarantine dis=none) header.from=kernel.org;\n dkim=pass (2048-bit key;\n unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256\n header.s=k20201202 header.b=DyrNjcdd; dkim-atps=neutral;\n spf=pass (client-ip=172.234.252.31; helo=sea.source.kernel.org;\n envelope-from=ebiggers@kernel.org;\n receiver=lists.ozlabs.org) smtp.mailfrom=kernel.org",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;\n\ts=k20201202; t=1768245811;\n\tbh=NltvZkewEHgk0OxV2OlqHClzS++fArO+KBZ7L9kUlbk=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=DyrNjcdd2UgBnDotjEXY8qII9iGNu1uEWirOyLRGsPUKHPRmLRsgrQYJZfK17EFOT\n\t Jjmq4w+utco9K5dko0xzOYNRvHThKn5H4/AzH0lvIa19igg/yEDaSoVVv0SEtNMe+E\n\t XSL1UzonfD7FtxVxqTjWkIT9zWnw19PISlMGaCOs9Ro7UEMdlMOZD/wId2NdVT1IqP\n\t yD6n1DPoVEl4eDRd4NEovQLTRJa1HSn+1iQ9HkrnviY85iMQyaDiYspDFfsvSgjk77\n\t FezNcc7WxWghb/T1QHeymsQNN3jPz/6MgE1q6Al5w6cr8a9181ylkwZWI9A5uMbQuY\n\t lQVtTc+2DGfZg==",
        "From": "Eric Biggers <ebiggers@kernel.org>",
        "To": "linux-crypto@vger.kernel.org",
        "Cc": "linux-kernel@vger.kernel.org,\n\tArd Biesheuvel <ardb@kernel.org>,\n\t\"Jason A . Donenfeld\" <Jason@zx2c4.com>,\n\tHerbert Xu <herbert@gondor.apana.org.au>,\n\tlinux-arm-kernel@lists.infradead.org,\n\tlinuxppc-dev@lists.ozlabs.org,\n\tlinux-riscv@lists.infradead.org,\n\tlinux-s390@vger.kernel.org,\n\tsparclinux@vger.kernel.org,\n\tx86@kernel.org,\n\tHolger Dengler <dengler@linux.ibm.com>,\n\tHarald Freudenberger <freude@linux.ibm.com>,\n\tEric Biggers <ebiggers@kernel.org>",
        "Subject": "[PATCH v2 24/35] crypto: arm64/ghash - Use new AES library API",
        "Date": "Mon, 12 Jan 2026 11:20:22 -0800",
        "Message-ID": "<20260112192035.10427-25-ebiggers@kernel.org>",
        "X-Mailer": "git-send-email 2.52.0",
        "In-Reply-To": "<20260112192035.10427-1-ebiggers@kernel.org>",
        "References": "<20260112192035.10427-1-ebiggers@kernel.org>",
        "X-Mailing-List": "linuxppc-dev@lists.ozlabs.org",
        "List-Id": "<linuxppc-dev.lists.ozlabs.org>",
        "List-Help": "<mailto:linuxppc-dev+help@lists.ozlabs.org>",
        "List-Owner": "<mailto:linuxppc-dev+owner@lists.ozlabs.org>",
        "List-Post": "<mailto:linuxppc-dev@lists.ozlabs.org>",
        "List-Archive": "<https://lore.kernel.org/linuxppc-dev/>,\n  <https://lists.ozlabs.org/pipermail/linuxppc-dev/>",
        "List-Subscribe": "<mailto:linuxppc-dev+subscribe@lists.ozlabs.org>,\n  <mailto:linuxppc-dev+subscribe-digest@lists.ozlabs.org>,\n  <mailto:linuxppc-dev+subscribe-nomail@lists.ozlabs.org>",
        "List-Unsubscribe": "<mailto:linuxppc-dev+unsubscribe@lists.ozlabs.org>",
        "Precedence": "list",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "X-Spam-Status": "No, score=-0.2 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,\n\tDKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS\n\tautolearn=disabled version=4.0.1 OzLabs 8",
        "X-Spam-Checker-Version": "SpamAssassin 4.0.1 (2024-03-25) on lists.ozlabs.org"
    },
    "content": "Switch from the old AES library functions (which use struct\ncrypto_aes_ctx) to the new ones (which use struct aes_enckey).  This\neliminates the unnecessary computation and caching of the decryption\nround keys.  The new AES en/decryption functions are also much faster\nand use AES instructions when supported by the CPU.\n\nNote that in addition to the change in the key preparation function and\nthe key struct type itself, the change in the type of the key struct\nresults in aes_encrypt() (which is temporarily a type-generic macro)\ncalling the new encryption function rather than the old one.\n\nAcked-by: Ard Biesheuvel <ardb@kernel.org>\nSigned-off-by: Eric Biggers <ebiggers@kernel.org>\n---\n arch/arm64/crypto/ghash-ce-glue.c | 27 +++++++--------------------\n 1 file changed, 7 insertions(+), 20 deletions(-)",
    "diff": "diff --git a/arch/arm64/crypto/ghash-ce-glue.c b/arch/arm64/crypto/ghash-ce-glue.c\nindex ef249d06c92c..63bb9e062251 100644\n--- a/arch/arm64/crypto/ghash-ce-glue.c\n+++ b/arch/arm64/crypto/ghash-ce-glue.c\n@@ -38,11 +38,11 @@ struct ghash_key {\n struct arm_ghash_desc_ctx {\n \tu64 digest[GHASH_DIGEST_SIZE/sizeof(u64)];\n };\n \n struct gcm_aes_ctx {\n-\tstruct crypto_aes_ctx\taes_key;\n+\tstruct aes_enckey\taes_key;\n \tu8\t\t\tnonce[RFC4106_NONCE_SIZE];\n \tstruct ghash_key\tghash_key;\n };\n \n asmlinkage void pmull_ghash_update_p64(int blocks, u64 dg[], const char *src,\n@@ -184,31 +184,19 @@ static struct shash_alg ghash_alg = {\n \t.import\t\t\t= ghash_import,\n \t.descsize\t\t= sizeof(struct arm_ghash_desc_ctx),\n \t.statesize\t\t= sizeof(struct ghash_desc_ctx),\n };\n \n-static int num_rounds(struct crypto_aes_ctx *ctx)\n-{\n-\t/*\n-\t * # of rounds specified by AES:\n-\t * 128 bit key\t\t10 rounds\n-\t * 192 bit key\t\t12 rounds\n-\t * 256 bit key\t\t14 rounds\n-\t * => n byte key\t=> 6 + (n/4) rounds\n-\t */\n-\treturn 6 + ctx->key_length / 4;\n-}\n-\n static int gcm_aes_setkey(struct crypto_aead *tfm, const u8 *inkey,\n \t\t\t  unsigned int keylen)\n {\n \tstruct gcm_aes_ctx *ctx = crypto_aead_ctx(tfm);\n \tu8 key[GHASH_BLOCK_SIZE];\n \tbe128 h;\n \tint ret;\n \n-\tret = aes_expandkey(&ctx->aes_key, inkey, keylen);\n+\tret = aes_prepareenckey(&ctx->aes_key, inkey, keylen);\n \tif (ret)\n \t\treturn -EINVAL;\n \n \taes_encrypt(&ctx->aes_key, key, (u8[AES_BLOCK_SIZE]){});\n \n@@ -294,11 +282,10 @@ static void gcm_calculate_auth_mac(struct aead_request *req, u64 dg[], u32 len)\n \n static int gcm_encrypt(struct aead_request *req, char *iv, int assoclen)\n {\n \tstruct crypto_aead *aead = crypto_aead_reqtfm(req);\n \tstruct gcm_aes_ctx *ctx = crypto_aead_ctx(aead);\n-\tint nrounds = num_rounds(&ctx->aes_key);\n \tstruct skcipher_walk walk;\n \tu8 buf[AES_BLOCK_SIZE];\n \tu64 dg[2] = {};\n \tbe128 lengths;\n \tu8 *tag;\n@@ -329,12 +316,12 @@ static int gcm_encrypt(struct aead_request *req, char *iv, int assoclen)\n \t\t\ttag = NULL;\n \t\t}\n \n \t\tscoped_ksimd()\n \t\t\tpmull_gcm_encrypt(nbytes, dst, src, ctx->ghash_key.h,\n-\t\t\t\t\t  dg, iv, ctx->aes_key.key_enc, nrounds,\n-\t\t\t\t\t  tag);\n+\t\t\t\t\t  dg, iv, ctx->aes_key.k.rndkeys,\n+\t\t\t\t\t  ctx->aes_key.nrounds, tag);\n \n \t\tif (unlikely(!nbytes))\n \t\t\tbreak;\n \n \t\tif (unlikely(nbytes > 0 && nbytes < AES_BLOCK_SIZE))\n@@ -357,11 +344,10 @@ static int gcm_encrypt(struct aead_request *req, char *iv, int assoclen)\n static int gcm_decrypt(struct aead_request *req, char *iv, int assoclen)\n {\n \tstruct crypto_aead *aead = crypto_aead_reqtfm(req);\n \tstruct gcm_aes_ctx *ctx = crypto_aead_ctx(aead);\n \tunsigned int authsize = crypto_aead_authsize(aead);\n-\tint nrounds = num_rounds(&ctx->aes_key);\n \tstruct skcipher_walk walk;\n \tu8 otag[AES_BLOCK_SIZE];\n \tu8 buf[AES_BLOCK_SIZE];\n \tu64 dg[2] = {};\n \tbe128 lengths;\n@@ -399,12 +385,13 @@ static int gcm_decrypt(struct aead_request *req, char *iv, int assoclen)\n \t\t}\n \n \t\tscoped_ksimd()\n \t\t\tret = pmull_gcm_decrypt(nbytes, dst, src,\n \t\t\t\t\t\tctx->ghash_key.h,\n-\t\t\t\t\t\tdg, iv, ctx->aes_key.key_enc,\n-\t\t\t\t\t\tnrounds, tag, otag, authsize);\n+\t\t\t\t\t\tdg, iv, ctx->aes_key.k.rndkeys,\n+\t\t\t\t\t\tctx->aes_key.nrounds, tag, otag,\n+\t\t\t\t\t\tauthsize);\n \n \t\tif (unlikely(!nbytes))\n \t\t\tbreak;\n \n \t\tif (unlikely(nbytes > 0 && nbytes < AES_BLOCK_SIZE))\n",
    "prefixes": [
        "v2",
        "24/35"
    ]
}