]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
doc/man3/OPENSSL_malloc.pod: size is no longer needed to be alignment multiple
authorEugene Syromiatnikov <esyr@openssl.org>
Thu, 28 Aug 2025 14:37:19 +0000 (16:37 +0200)
committerNeil Horman <nhorman@openssl.org>
Tue, 16 Sep 2025 13:59:13 +0000 (09:59 -0400)
While the commit 648803a17e4c1 "crypto/mem.c: don't use aligned_alloc
in CRYPTO_aligned_alloc" removed the aligned_alloc() usage
along with its overly onerous requirements, its author failed to update
the documentation accordingly.  Correct that omission by removing
the requirement from the DESCRIPTION and adding a relevant mention
in HISTORY.

Complements: 648803a17e4c1 "crypto/mem.c: don't use aligned_alloc in CRYPTO_aligned_alloc"
Signed-off-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28295)

doc/man3/OPENSSL_malloc.pod

index c101f085039a1d24b88e81d08778d31dd308d1cd..ffea63b169002a81f49fc96f3bf4a85346c712e2 100644 (file)
@@ -125,8 +125,7 @@ OPENSSL_zalloc() calls memset() to zero the memory before returning.
 OPENSSL_aligned_alloc() operates just as OPENSSL_malloc() does, but it
 allows for the caller to specify an alignment value, for instances in
 which the default alignment of malloc is insufficient for the caller's
-needs.  Note, the alignment value must be a power of 2, and the size
-specified must be a multiple of the alignment.
+needs.  Note, the alignment value must be a power of 2.
 NOTES:
 
 =over 4
@@ -317,6 +316,11 @@ OPENSSL_realloc_array(), OPENSSL_clear_realloc_array(), CRYPTO_malloc_array(),
 CRYPTO_calloc(), CRYPTO_aligned_alloc_array(), CRYPTO_realloc_array(),
 CRYPTO_clear_realloc_array() were added in OpenSSL 3.6.
 
+Before OpenSSL 3.6, there was an OPENSSL_aligned_malloc() requirement
+that the size must be a multiple of the alignment, that was enforced
+only on platforms that do not provide posix_memalign(3), but do provide
+aligned_alloc(3).
+
 =head1 COPYRIGHT
 
 Copyright 2016-2025 The OpenSSL Project Authors. All Rights Reserved.