From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [IPv6:2a0f:8001:1:32::40]) by lore.proxmox.com (Postfix) with ESMTPS id 21BC81FF0C0 for ; Wed, 18 Nov 2026 10:22:39 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id D91A021672; Wed, 18 Nov 2026 10:22:36 +0100 (CET) Message-ID: <84706f35-a2f7-4d8d-a4f8-6dceb86d416d@proxmox.com> Date: Wed, 18 Nov 2026 10:22:31 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Beta Subject: Re: [PATCH pve-cluster] pmxcfs: check_memdb: accept the big-endian index checksum To: Yvan Janssens , pve-devel@lists.proxmox.com References: <20261118090735.71816-1-yvanj@cyber.gent> Content-Language: en-US From: Dominik Csapak In-Reply-To: <20261118090735.71816-1-yvanj@cyber.gent> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1794993751490 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.285 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: JTNMBUTWFPOMFXC2PCW7J2EL5ROKHJLH X-Message-ID-Hash: JTNMBUTWFPOMFXC2PCW7J2EL5ROKHJLH X-MailFrom: d.csapak@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Thomas Lamprecht X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 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 > --- > 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); > }