Current-Users archive

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

Re: mail/sendmail not relaying on netbsd-9/sparc, problem with OpenSSL update?



Well, the assembly block is enabled only if we have vis3 instructions:

# elif  defined(GHASH_ASM_SPARC)
    if (OPENSSL_sparcv9cap_P[0] & SPARCV9_VIS3) {
        gcm_init_vis3(ctx->Htable, ctx->H.u);
        ctx->gmult = gcm_gmult_vis3;
        CTX__GHASH(gcm_ghash_vis3);
    } else {
        gcm_init_4bit(ctx->Htable, ctx->H.u);
        ctx->gmult = gcm_gmult_4bit;
        CTX__GHASH(gcm_ghash_4bit);
    }

What does OPENSSL_sparcv9_cap_P[0] contain.

christos

> On Apr 8, 2021, at 7:04 AM, Martin Husemann <martin%duskware.de@localhost> wrote:
> 
> On Thu, Apr 08, 2021 at 02:36:07AM -0500, John D. Baker wrote:
>> -#  if defined(__arch64__)
>> -#   define GHASH_ASM_SPARC
>> -#   define GCM_FUNCREF_4BIT
>> +#  define GHASH_ASM_SPARC
>> +#  define GCM_FUNCREF_4BIT
>> extern unsigned int OPENSSL_sparcv9cap_P[];
>> void gcm_init_vis3(u128 Htable[16], const u64 Xi[2]);
>> void gcm_gmult_vis3(u64 Xi[2], const u128 Htable[16]);
>> void gcm_ghash_vis3(u64 Xi[2], const u128 Htable[16], const u8 *inp,
>>                     size_t len);
>> -#  endif
>> [...]
>> 
>> That is, before the pull-up of OpenSSL 1.1.1k, the "GHASH_ASM_SPARC"
>> macro was conditionally defined iff "__arch64__" was also defined--
>> likely an internal compiler definition.
> 
> I had a look and can reproduce the issue localy (without sendmail
> involved) - a simple:
> 
> 	openssl s_client -starttls smtp -connect ${MAIL_SERVER}:25
> 
> does it.
> 
> Different to other asm code that e.g. properly detetects various VIS
> instructions that may or may not be available on the current CPU, the code
> in ghash-sparcv9.pl is plain sparcv9 code and can not be enabled for our
> sparc builds.
> 
> Christos, can you disable all "modes" asm and request pullup?
> I can quickly test on -current...
> 
> Martin

Attachment: signature.asc
Description: Message signed with OpenPGP



Home | Main Index | Thread Index | Old Index