From: Dominik Csapak <d.csapak@proxmox.com>
To: Yvan Janssens <yvanj@cyber.gent>, pve-devel@lists.proxmox.com
Cc: Thomas Lamprecht <t.lamprecht@proxmox.com>
Subject: Re: [PATCH pve-cluster] pmxcfs: check_memdb: accept the big-endian index checksum
Date: Wed, 18 Nov 2026 10:22:31 +0100 [thread overview]
Message-ID: <84706f35-a2f7-4d8d-a4f8-6dceb86d416d@proxmox.com> (raw)
In-Reply-To: <20261118090735.71816-1-yvanj@cyber.gent>
Hi,
just wanted to ask:
Is there a specific use case you have to port pve on s390x ?
I don't think we want to support s390x currently so adding
s390x specific code won't probably come in soon
(please correct me if i'm wrong @thomas)
I guess changes such as these *could* be integrated since
they're not special for s390x, but I don't think there are
many big-endian systems left...
In any case, did you see our developer docs:
https://pve.proxmox.com/wiki/Developer_Documentation
especially the part about the signed CLA
(since i didn't found any patches prior to this on our mailing list)
On 11/18/26 10:07 AM, Yvan Janssens wrote:
> The memdb index and its per-entry digests are built from host-endian
> integers, so the checksum hard-coded in test_indextest1 only matches on
> little-endian hosts, and the test fails on every big-endian one (for
> example s390x and big-endian ppc64).
>
> Add the big-endian checksum. On s390x, converting all integers to
> little-endian before hashing reproduces the existing checksum, so both
> values describe the same index. As the index has only fixed-width
> fields, the big-endian value holds for any big-endian host.
>
> Signed-off-by: Yvan Janssens <yvanj@cyber.gent>
> ---
> src/pmxcfs/check_memdb.c | 11 +++++++----
> 1 file changed, 7 insertions(+), 4 deletions(-)
>
> diff --git a/src/pmxcfs/check_memdb.c b/src/pmxcfs/check_memdb.c
> index 74728df..616ae61 100644
> --- a/src/pmxcfs/check_memdb.c
> +++ b/src/pmxcfs/check_memdb.c
> @@ -270,10 +270,13 @@ START_TEST(test_indextest1) {
> ck_assert(sha256 != NULL);
> g_checksum_update(sha256, (unsigned char *)idx, idx->bytes);
> const char *csum = g_checksum_get_string(sha256);
> - ck_assert_msg(
> - strcmp(csum, "913fd95015af9d93f10dd51ba2a7bb11351bcfe040be21e95fcba834adc3ec10") == 0,
> - "wrong idx checksum %s", csum
> - );
> + /* the index and its per-entry digests are built from host-endian integers */
> +#if G_BYTE_ORDER == G_BIG_ENDIAN
> + const char *expected = "efdfcdde67acb6b48e4b415a172d5a1897c725b03a9b2c12d20efe0ab8adad44";
> +#else
> + const char *expected = "913fd95015af9d93f10dd51ba2a7bb11351bcfe040be21e95fcba834adc3ec10";
> +#endif
> + ck_assert_msg(strcmp(csum, expected) == 0, "wrong idx checksum %s", csum);
> g_free(idx);
> g_free(testdata);
> }
next prev parent reply other threads:[~2026-11-18 9:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-18 9:07 [PATCH pve-cluster] pmxcfs: check_memdb: accept the big-endian index checksum Yvan Janssens
2026-11-18 9:22 ` Dominik Csapak [this message]
2026-11-18 9:29 ` Yvan Janssens
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=84706f35-a2f7-4d8d-a4f8-6dceb86d416d@proxmox.com \
--to=d.csapak@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
--cc=t.lamprecht@proxmox.com \
--cc=yvanj@cyber.gent \
/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