From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3F54C3AF643; Tue, 21 Jul 2026 21:15:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784668524; cv=none; b=qIT6IFAMj62N8eRv61/+snC4XQ3uLlFM3wiA4B42yxTAknr2Pe+wxrG+O11cUhXahW8L3ML+R6VNHhhG0oKs1zGmah8EoWbZi9Q7o0wT/nUaXudp11OYkncExDQLQ/O2g34OF/MPV2AutAfmGSnrYD47aKoZ6MRxFVwgpY+wxdk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784668524; c=relaxed/simple; bh=j4hdhWl5jcRkoznMKV0q5praN5eA9X+Gkx7AAlnoqT8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=iFJQNti2F9nABlZKsc3ASgdXeq5DOVutKgdjDZ6i0tHhp1llQMLjF6j9wrP3vRdh3Zpklcx6TjGmE8t43mpdD0NaQega2y0gm7X7CjjyDfh+SZFs1KMJzIQ4kuqZClGt6HnoD5vICdOztgf1haRW4DgRfj22FnepabZsY9lT+cY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=yQ2Ftfsi; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="yQ2Ftfsi" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A487E1F000E9; Tue, 21 Jul 2026 21:15:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1784668523; bh=mMvRnTb0nlPE2k1OF0ucIMQVxYarEnZDhzAfqxo8R0M=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=yQ2FtfsiH3yitDdwg5V+jJenlA9DLn4Deg1YEt3lTJ3YmU21GDtrT2ho3LuRfzq48 IhYFSRxpckd1WUtdb9HbN88A871e3PlSXLxw4yfjhO5mNuCpKPE5CicvS7hTfkoIE+ p2wdfHVtUMuOtmp7izHEXc/XD60am4B3lk9ASsZM= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Thorsten Blum , Herbert Xu Subject: [PATCH 6.1 0209/1067] crypto: caam - use print_hex_dump_devel to guard key hex dumps again Date: Tue, 21 Jul 2026 17:13:30 +0200 Message-ID: <20260721152429.268047275@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260721152424.521567757@linuxfoundation.org> References: <20260721152424.521567757@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Thorsten Blum commit 8005dc808bcce7d6cc2ae015a3cde1683bee602d upstream. Use print_hex_dump_devel() for dumping sensitive key material in *_setkey() to avoid leaking secrets at runtime when CONFIG_DYNAMIC_DEBUG is enabled. Fixes: 8d818c105501 ("crypto: caam/qi2 - add DPAA2-CAAM driver") Fixes: 226853ac3ebe ("crypto: caam/qi2 - add skcipher algorithms") Cc: stable@vger.kernel.org Signed-off-by: Thorsten Blum Signed-off-by: Herbert Xu Signed-off-by: Greg Kroah-Hartman --- drivers/crypto/caam/caamalg_qi2.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) --- a/drivers/crypto/caam/caamalg_qi2.c +++ b/drivers/crypto/caam/caamalg_qi2.c @@ -297,7 +297,7 @@ static int aead_setkey(struct crypto_aea dev_dbg(dev, "keylen %d enckeylen %d authkeylen %d\n", keys.authkeylen + keys.enckeylen, keys.enckeylen, keys.authkeylen); - print_hex_dump_debug("key in @" __stringify(__LINE__)": ", + print_hex_dump_devel("key in @" __stringify(__LINE__)": ", DUMP_PREFIX_ADDRESS, 16, 4, key, keylen, 1); ctx->adata.keylen = keys.authkeylen; @@ -311,7 +311,7 @@ static int aead_setkey(struct crypto_aea memcpy(ctx->key + ctx->adata.keylen_pad, keys.enckey, keys.enckeylen); dma_sync_single_for_device(dev, ctx->key_dma, ctx->adata.keylen_pad + keys.enckeylen, ctx->dir); - print_hex_dump_debug("ctx.key@" __stringify(__LINE__)": ", + print_hex_dump_devel("ctx.key@" __stringify(__LINE__)": ", DUMP_PREFIX_ADDRESS, 16, 4, ctx->key, ctx->adata.keylen_pad + keys.enckeylen, 1); @@ -728,7 +728,7 @@ static int gcm_setkey(struct crypto_aead ret = aes_check_keylen(keylen); if (ret) return ret; - print_hex_dump_debug("key in @" __stringify(__LINE__)": ", + print_hex_dump_devel("key in @" __stringify(__LINE__)": ", DUMP_PREFIX_ADDRESS, 16, 4, key, keylen, 1); memcpy(ctx->key, key, keylen); @@ -824,7 +824,7 @@ static int rfc4106_setkey(struct crypto_ if (ret) return ret; - print_hex_dump_debug("key in @" __stringify(__LINE__)": ", + print_hex_dump_devel("key in @" __stringify(__LINE__)": ", DUMP_PREFIX_ADDRESS, 16, 4, key, keylen, 1); memcpy(ctx->key, key, keylen); @@ -923,7 +923,7 @@ static int rfc4543_setkey(struct crypto_ if (ret) return ret; - print_hex_dump_debug("key in @" __stringify(__LINE__)": ", + print_hex_dump_devel("key in @" __stringify(__LINE__)": ", DUMP_PREFIX_ADDRESS, 16, 4, key, keylen, 1); memcpy(ctx->key, key, keylen); @@ -951,7 +951,7 @@ static int skcipher_setkey(struct crypto u32 *desc; const bool is_rfc3686 = alg->caam.rfc3686; - print_hex_dump_debug("key in @" __stringify(__LINE__)": ", + print_hex_dump_devel("key in @" __stringify(__LINE__)": ", DUMP_PREFIX_ADDRESS, 16, 4, key, keylen, 1); ctx->cdata.keylen = keylen;