This patch imports the `crypt_sha512.c` file from the musl library. We need it to incorporate yielding in the `crypt_r` function to avoid reactor stalls during long hashing computations. Before this patch series, ScyllaDB used SHA-512 hashing provided by the `crypt_r` function, which in our case meant using the implementation from the `libxcrypt` library. Adding yielding to this `libxcrypt` implementation is problematic, both due to licensing (LGPL) and because the implementation is split into many functions across multiple files. In contrast, the SHA-512 implementation from `musl libc` has a more permissive license and is concise, which makes it easier to incorporate into the ScyllaDB codebase. Both `crypt_sha512.c` and musl license are obtained from git.musl-libc.org: - https://git.musl-libc.org/cgit/musl/tree/src/crypt/crypt_sha512.c - https://git.musl-libc.org/cgit/musl/tree/COPYRIGHT Import commit: commit 1b76ff0767d01df72f692806ee5adee13c67ef88 Author: Alex Rønne Petersen <alex@alexrp.com> Date: Sun Oct 12 05:35:19 2025 +0200 s390x: shuffle register usage in __tls_get_offset to avoid r0 as address Refs: scylladb/scylladb#26859
Note on licenses directory
The files in this directory represent licenses that apply to portions of the work. See each source file for applicable licenses.
The work in whole is licensed under the ScyllaDB-Source-Available-1.0 license. the LICENSE-ScyllaDB-Source-Available.md file in the top-level directory.
Individual files contain the following tag:
SPDX-License-Identifier: LicenseRef-ScyllaDB-Source-Available-1.0
Some files are derived from Apache projects. These are dual-licensed with the Apache License (version 2) and ScyllaDB-Source-Available-1.0. They contain the following tag:
SPDX-License-Identifier: (LicenseRef-ScyllaDB-Source-Available-1.0 and Apache-2.0)
musl libc files
licenses/musl-license.txt is obtained from:
https://git.musl-libc.org/cgit/musl/tree/COPYRIGHT
utils/crypt_sha512.cc is obtained from:
https://git.musl-libc.org/cgit/musl/tree/src/crypt/crypt_sha512.c
Both files are obtained from git.musl-libc.org. Import commit: commit 1b76ff0767d01df72f692806ee5adee13c67ef88 Author: Alex Rønne Petersen alex@alexrp.com Date: Sun Oct 12 05:35:19 2025 +0200
s390x: shuffle register usage in __tls_get_offset to avoid r0 as address
musl as a whole is licensed under the standard MIT license included in
licenses/musl-license.txt.