[openssl/openssl] 5fa65d: Fix comment syntax

Xi Ruoyao noreply at github.com
Tue Dec 19 13:24:29 UTC 2023


  Branch: refs/heads/openssl-3.2
  Home:   https://github.com/openssl/openssl
  Commit: 5fa65d64f60a3cfd2b2fb09c37edf19f82245be5
      https://github.com/openssl/openssl/commit/5fa65d64f60a3cfd2b2fb09c37edf19f82245be5
  Author: Kai Pastor <dg0yt at darc.de>
  Date:   2023-12-19 (Tue, 19 Dec 2023)

  Changed paths:
    M crypto/ec/asm/ecp_sm2p256-armv8.pl

  Log Message:
  -----------
  Fix comment syntax

Reviewed-by: Hugo Landau <hlandau at openssl.org>
Reviewed-by: Tom Cosgrove <tom.cosgrove at arm.com>
(Merged from https://github.com/openssl/openssl/pull/23072)

(cherry picked from commit 1fda942e8cd425263433094bf8714a80c05bcb2c)


  Commit: 67789a1e2ae8719107ad8d1dac26560d1fa5610d
      https://github.com/openssl/openssl/commit/67789a1e2ae8719107ad8d1dac26560d1fa5610d
  Author: Kai Pastor <dg0yt at darc.de>
  Date:   2023-12-19 (Tue, 19 Dec 2023)

  Changed paths:
    M crypto/ec/ecp_sm2p256.c

  Log Message:
  -----------
  Fix declspec align syntax

Reviewed-by: Hugo Landau <hlandau at openssl.org>
Reviewed-by: Tom Cosgrove <tom.cosgrove at arm.com>
(Merged from https://github.com/openssl/openssl/pull/23072)

(cherry picked from commit dfd986b6f5402e5646e42425d14f098ed6bc4544)


  Commit: 1ef7788331f998276c8cc7a4292bcd856cc9de9e
      https://github.com/openssl/openssl/commit/1ef7788331f998276c8cc7a4292bcd856cc9de9e
  Author: Xi Ruoyao <xry111 at xry111.site>
  Date:   2023-12-19 (Tue, 19 Dec 2023)

  Changed paths:
    M crypto/chacha/asm/chacha-loongarch64.pl

  Log Message:
  -----------
  LoongArch64 assembly pack: Fix ChaCha20 ABI breakage

The [LP64D ABI][1] requires the floating-point registers f24-f31
(aka fs0-fs7) callee-saved.  The low 64 bits of a LSX/LASX vector
register aliases with the corresponding FPR, so we must save and restore
the callee-saved FPR when we writes into the corresponding vector
register.

This ABI breakage can be easily demonstrated by injecting the use of a
saved FPR into the test in bio_enc_test.c:

    static int test_bio_enc_chacha20(int idx)
    {
        register double fs7 asm("f31") = 114.514;
        asm("#optimize barrier":"+f"(fs7));
        return do_test_bio_cipher(EVP_chacha20(), idx) && fs7 == 114.514;
    }

So fix it.  To make the logic simpler, jump into the scalar
implementation earlier when LSX and LASX are not enumerated in AT_HWCAP,
or the input is too short.

[1]: https://github.com/loongson/la-abi-specs/blob/v2.20/lapcs.adoc#floating-point-registers

Reviewed-by: Neil Horman <nhorman at openssl.org>
Reviewed-by: Tomas Mraz <tomas at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22817)

(cherry picked from commit b46de72c260e7c4d9bfefa35b02295ba32ad2ac6)


Compare: https://github.com/openssl/openssl/compare/8d41c04ea887...1ef7788331f9


More information about the openssl-commits mailing list