Received: by 2002:ab2:6991:0:b0:1f7:f6c3:9cb1 with SMTP id v17csp175307lqo; Tue, 7 May 2024 16:43:35 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVEnNEEdoH1pPpmvF4J7XjGQ8zQHU9YUP83pXhmQSELyXbwtnSzUC3jwH5eeAQYtgbpMPE5321JyRddPmIbb40Moa0/kAs3ADo62vWJvw== X-Google-Smtp-Source: AGHT+IE6LThvahO5lxknUTzQ89eRwUf99whuydoNu8tvZYxw3KQJbIMylSwHZW0ID8P3t7dEdjoU X-Received: by 2002:a2e:8ec4:0:b0:2df:c2b:8c84 with SMTP id 38308e7fff4ca-2e446d83d91mr5557781fa.1.1715125415082; Tue, 07 May 2024 16:43:35 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715125415; cv=pass; d=google.com; s=arc-20160816; b=Vc7TGMvD86PbkUkw8+mwCuWHhmnSmjgKduaXCdYChdq1Cd9rTc+QytShwyStYfwIXq 00cDRIpNt0t3xkmYh2B1s+3VKUiiqLbbsjyEEprwJ8/fERYirw4eP+si+qva5+u6zh2o M9MZIrs6lVn+rRN8d6yL+WEiNeqyNvkqW4TalNJt59I0J+G/Cgf4AaRcgpD1pR5+WE7V kDN+ZTRwnXwuVQRFRv5dV5Mqxz89sA9sd2spGRtxqf3aRr1tmM7RZ+2Q/ANLkukAQ+SH IF1sINh1KIp43CbkLJWfBL0GeQ/IKfF42K3UMbArFNPJL+PdCbXE7TJl/g5wyCNhmG2U 5kJA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=LERFqxbnG8+w0aJyhdKNLdSkM06sKS7e1JIKX9Fg58c=; fh=QDKdxdf6dq7wm639gFdELozh9oA/utMr7hnNrYiek0Y=; b=qxnBpUsg5LBxu2eCxoC50RxuC5Y8/yXzzHgvxiw3XHpi3jji5bHVxTG13/epGhlCZp aP4assXiNe7YYyz79chhUurIPz79YrzZWN9FWvkpmfLW/d9mhsqpM1n9J2t2JlxmT69V GZ7toIPPpz8rJyNDMPpIbt4DtI+Z7Ll3hz3vfsXXo7Fv/nG5+xKjs6Sy8TmMv9DudNTf WF3Hvk1sL9zfz4ognr7AA3Dy/uZW3CG5okEuzHXTRFCL8a7GBz6MBNn9UkmI2QW7FOt5 dgO93nTpnH3NCgDkStDZcRFH5AkzXa5H1aMPyVT+WDLVT51U3dblNSsuzujTiGSYqerb pSNg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Lkpi17zb; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-172435-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-172435-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id k13-20020a05640212cd00b00572b1de5b12si4997047edx.377.2024.05.07.16.43.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 16:43:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-172435-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Lkpi17zb; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-172435-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-172435-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id C6C851F21075 for ; Tue, 7 May 2024 23:43:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A480A178CE7; Tue, 7 May 2024 23:12:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Lkpi17zb" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 BF655172BDB; Tue, 7 May 2024 23:12:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715123525; cv=none; b=Qy/EgEb7PDl9fVF43xD9R+yvd3K0yoyel0TuQGhJDsFiq/ua1ylryHVA1Ikmf6D4JNt6A3Yu9YzYK1yN17AzhalCPN1NBc3B6SacR5KPWDynRbkKC/WvFxGxtCLIeSdP8D7y/KHCNVnmh3dHaxxPDDlYkAbrcJqY8s+68odf8aE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715123525; c=relaxed/simple; bh=xKGJxFne+UyiXVYKvVnAuWWupcJYyWxk89f2UMkT1LM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=deK2Fb7vhUB0tYqhS7y3KOHu1RCBIwyVPf3zN4hJ65GG7xKgEnwUSYM2WEoNQKlttPgKCLPrHwsGVwO015zG222DLP7logmkFsTjwEJ8MGsWVUK+s0APHcIAGhbEG6tYa4/3zf5gvd/G5BZhgYJAQ4EJH38CbsM6lWJc1giyidA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Lkpi17zb; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9ED9EC4AF17; Tue, 7 May 2024 23:12:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1715123525; bh=xKGJxFne+UyiXVYKvVnAuWWupcJYyWxk89f2UMkT1LM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Lkpi17zbfKyeJ2xHZsVSOG49pFs+gQQqSlbCv85OrvjXrQ9uY1Q0StKAfXOL6pyvj 70UqcxMRamH9OTvFhxCfj6Hu0drHeRvz6Lt4Qx4XZozE9wtjT7GwWlilIDb2OCIrUl fYvH9mSX8YoP+vIS1XWk3NGFKN3jF3PlQTJHdm4het1DUcQCx0tKP3eBEmtLlHCXI2 inmjDlTPPoKQZZNOmapR1xFA0nxLH4VAnJxAsZstlC9BUAy83po85Ys6dU87k1Ftzm JBWB9p3diejr+aeOLcp60401qcikJtDULZQOSxcUWJm9IFKMh4RQH0hm9hlWx19nRX TZGlZcL862LuQ== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Maurizio Lombardi , Sagi Grimberg , Chaitanya Kulkarni , Keith Busch , Sasha Levin , hare@suse.de, linux-nvme@lists.infradead.org Subject: [PATCH AUTOSEL 6.6 39/43] nvmet-auth: replace pr_debug() with pr_err() to report an error. Date: Tue, 7 May 2024 19:10:00 -0400 Message-ID: <20240507231033.393285-39-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240507231033.393285-1-sashal@kernel.org> References: <20240507231033.393285-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-stable-base: Linux 6.6.30 Content-Transfer-Encoding: 8bit From: Maurizio Lombardi [ Upstream commit 445f9119e70368ccc964575c2a6d3176966a9d65 ] In nvmet_auth_host_hash(), if a mismatch is detected in the hash length the kernel should print an error. Signed-off-by: Maurizio Lombardi Reviewed-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni Signed-off-by: Keith Busch Signed-off-by: Sasha Levin --- drivers/nvme/target/auth.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/nvme/target/auth.c b/drivers/nvme/target/auth.c index 1f7d492c4dc26..e900525b78665 100644 --- a/drivers/nvme/target/auth.c +++ b/drivers/nvme/target/auth.c @@ -284,9 +284,9 @@ int nvmet_auth_host_hash(struct nvmet_req *req, u8 *response, } if (shash_len != crypto_shash_digestsize(shash_tfm)) { - pr_debug("%s: hash len mismatch (len %d digest %d)\n", - __func__, shash_len, - crypto_shash_digestsize(shash_tfm)); + pr_err("%s: hash len mismatch (len %d digest %d)\n", + __func__, shash_len, + crypto_shash_digestsize(shash_tfm)); ret = -EINVAL; goto out_free_tfm; } -- 2.43.0