From: Roberto Sassu <roberto.sassu@huaweicloud.com>
To: dhowells@redhat.com, herbert@gondor.apana.org.au, davem@davemloft.net
Cc: zohar@linux.ibm.com, dmitry.kasatkin@gmail.com,
paul@paul-moore.com, jmorris@namei.org, serge@hallyn.com,
ebiggers@kernel.org, keyrings@vger.kernel.org,
linux-crypto@vger.kernel.org, linux-integrity@vger.kernel.org,
linux-security-module@vger.kernel.org,
linux-kernel@vger.kernel.org,
Roberto Sassu <roberto.sassu@huawei.com>
Subject: [PATCH] public_key: Add a comment to public_key_signature struct definition
Date: Wed, 7 Dec 2022 11:54:30 +0100 [thread overview]
Message-ID: <20221207105430.248613-1-roberto.sassu@huaweicloud.com> (raw)
From: Roberto Sassu <roberto.sassu@huawei.com>
public_key_verify_signature() calls sg_set_buf() to set the signature and
digest for the signature verification.
As sg_set_buf() requires the buffer to be in physically contiguous memory,
see commit ac4e97abce9b8 ("scatterlist: sg_set_buf() argument must be in
linear mapping"), mention that in a comment for the signature and digest
fields of the public_key_signature structure.
Link: https://lore.kernel.org/linux-integrity/Y4pIpxbjBdajymBJ@sol.localdomain/
Suggested-by: Eric Biggers <ebiggers@kernel.org>
Signed-off-by: Roberto Sassu <roberto.sassu@huawei.com>
---
include/crypto/public_key.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/crypto/public_key.h b/include/crypto/public_key.h
index 68f7aa2a7e55..6d623e063034 100644
--- a/include/crypto/public_key.h
+++ b/include/crypto/public_key.h
@@ -37,8 +37,8 @@ extern void public_key_free(struct public_key *key);
*/
struct public_key_signature {
struct asymmetric_key_id *auth_ids[3];
- u8 *s; /* Signature */
- u8 *digest;
+ u8 *s; /* Signature (in physically contiguous mem) */
+ u8 *digest; /* Digest (in physically contiguous mem) */
u32 s_size; /* Number of bytes in signature */
u32 digest_size; /* Number of bytes in digest */
const char *pkey_algo;
--
2.25.1
next reply other threads:[~2022-12-07 10:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-07 10:54 Roberto Sassu [this message]
2023-01-20 19:21 ` [PATCH] public_key: Add a comment to public_key_signature struct definition Paul Moore
2023-01-20 19:43 ` Eric Biggers
2023-01-20 20:16 ` Paul Moore
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=20221207105430.248613-1-roberto.sassu@huaweicloud.com \
--to=roberto.sassu@huaweicloud.com \
--cc=davem@davemloft.net \
--cc=dhowells@redhat.com \
--cc=dmitry.kasatkin@gmail.com \
--cc=ebiggers@kernel.org \
--cc=herbert@gondor.apana.org.au \
--cc=jmorris@namei.org \
--cc=keyrings@vger.kernel.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-integrity@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=paul@paul-moore.com \
--cc=roberto.sassu@huawei.com \
--cc=serge@hallyn.com \
--cc=zohar@linux.ibm.com \
/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;
as well as URLs for NNTP newsgroup(s).