From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Frediano Ziglio <frediano.ziglio@cloud.com>,
xen-devel@lists.xenproject.org
Cc: "Ross Lagerwall" <ross.lagerwall@citrix.com>,
"Anthony PERARD" <anthony.perard@vates.tech>,
"Michal Orzel" <michal.orzel@amd.com>,
"Jan Beulich" <jbeulich@suse.com>,
"Julien Grall" <julien@xen.org>,
"Roger Pau Monné" <roger.pau@citrix.com>,
"Stefano Stabellini" <sstabellini@kernel.org>
Subject: Re: [PATCH 1/4] xen/lib: Export additional sha256 functions
Date: Tue, 6 May 2025 15:05:21 +0100 [thread overview]
Message-ID: <de48c8bc-a7b2-4b9f-b45e-cbe3f7eb03c4@citrix.com> (raw)
In-Reply-To: <20250506135655.187014-2-frediano.ziglio@cloud.com>
On 06/05/2025 2:56 pm, Frediano Ziglio wrote:
> diff --git a/xen/include/xen/sha2.h b/xen/include/xen/sha2.h
> index 47d97fbf01..ea8bad67e4 100644
> --- a/xen/include/xen/sha2.h
> +++ b/xen/include/xen/sha2.h
> @@ -9,6 +9,16 @@
>
> #define SHA2_256_DIGEST_SIZE 32
>
> +struct sha2_256_state {
> + uint32_t state[SHA2_256_DIGEST_SIZE / sizeof(uint32_t)];
> + uint8_t buf[64];
> + size_t count; /* Byte count. */
> +};
> +
> +void sha2_256_init(struct sha2_256_state *s);
> +void sha2_256_update(struct sha2_256_state *s, const void *msg,
> + size_t len);
> +void sha2_256_final(struct sha2_256_state *s, void *_dst);
> void sha2_256_digest(uint8_t digest[SHA2_256_DIGEST_SIZE],
> const void *msg, size_t len);
sha2_256_digest() is unlike the others as it holds sha2_256_state
internally. I'd suggest having all of the additions below this point,
which group them more nicely.
Can fix on commit. Otherwise LGTM.
~Andrew
next prev parent reply other threads:[~2025-05-06 14:05 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-06 13:56 [PATCH 0/4] Allows Secure Boot for Kexec Frediano Ziglio
2025-05-06 13:56 ` [PATCH 1/4] xen/lib: Export additional sha256 functions Frediano Ziglio
2025-05-06 14:05 ` Andrew Cooper [this message]
2025-05-06 22:17 ` Andrew Cooper
2025-05-07 5:26 ` Frediano Ziglio
2025-05-07 6:17 ` Andrew Cooper
2025-05-12 10:30 ` Jan Beulich
2025-05-06 13:56 ` [PATCH 4/4] kexec: Support non-page-aligned kexec segments Frediano Ziglio
2025-05-06 14:11 ` [PATCH 0/4] Allows Secure Boot for Kexec Andrii Sultanov
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=de48c8bc-a7b2-4b9f-b45e-cbe3f7eb03c4@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=anthony.perard@vates.tech \
--cc=frediano.ziglio@cloud.com \
--cc=jbeulich@suse.com \
--cc=julien@xen.org \
--cc=michal.orzel@amd.com \
--cc=roger.pau@citrix.com \
--cc=ross.lagerwall@citrix.com \
--cc=sstabellini@kernel.org \
--cc=xen-devel@lists.xenproject.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.