coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bug#1037264: cksum crashes intermittently with "Illegal instruction"


From: Pádraig Brady
Subject: Re: Bug#1037264: cksum crashes intermittently with "Illegal instruction" on some Xen DomU
Date: Tue, 13 Jun 2023 10:38:12 +0100
User-agent: Mozilla Thunderbird

On 13/06/2023 09:38, Axel Beckert wrote:
Hi, especially to Pádraig,


Pádraig Brady wrote:
cksum since v9.0 checks at runtime whether pclmul is supported.
It seems that check is not working appropriately on a Xen DomU.
The routine in question is pclmul_supported() at:
https://github.com/coreutils/coreutils/blob/b841f111/src/cksum.c#L160-L191

That either suggests xen is incorrectly setting PCLMUL and AVX bits,
or perhaps these two bits are not sufficient.
Hmm I wonder do we also need to explicitly check for SSSE3 support?

I.e. I wonder does cksum built with the following help?
[…]
diff --git a/src/cksum.c b/src/cksum.c
index 85afab0ac..98733dadf 100644
--- a/src/cksum.c
+++ b/src/cksum.c
@@ -172,7 +172,7 @@ pclmul_supported (void)
        return false;
      }

-  if (! (ecx & bit_PCLMUL) || ! (ecx & bit_AVX))
+  if (! (ecx & bit_PCLMUL) || ! (ecx & bit_AVX) || ! (ecx & bit_SSSE3))
      {
        if (cksum_debug)
          error (0, 0, "%s", _("pclmul support not detected"));

No, the patch unfortunately didn't help:

It's great you can test changes at least.
Thanks for trying the above.

At this stage it would be good to get the output from `cpuid -1`
so that hopefully we can get something there to key on
that indicates the cpu doesn't support the instructions.

thanks,
Pádraig



reply via email to

[Prev in Thread] Current Thread [Next in Thread]