On Tue, 12 Aug 2025 00:12:39 GMT, Valerie Peng <valer...@openjdk.org> wrote:
> The current `getNativeKeyInfo(...)` method impl inside SunPKCS11 provider's > p11_keymgmt.c queries key attributes and pack the resulting data into a blob > which is later passed to the `createNativeKey(...)` method to create a native > key handle. Some of these attributes have type CK_ULONG values and this may > lead to SIGBUS errors on Solaris sparc when these attrbute values aren't > 64-bit aligned. > > In order to ensure the proper alignment, one way to fix this is to re-order > the attributes in the template by their value types starting with those > requiring alignments. Also ordered attributes with the same value types > alphabetically. > > Thanks in advance for the review~ This pull request has now been integrated. Changeset: 640b71da Author: Valerie Peng <valer...@openjdk.org> URL: https://git.openjdk.org/jdk/commit/640b71da48c41e1f216f6bee1e7871961322cf53 Stats: 97 lines in 2 files changed: 48 ins; 40 del; 9 mod 8365168: Use 64-bit aligned addresses for CK_ULONG access in PKCS11 native key code Reviewed-by: coffeys ------------- PR: https://git.openjdk.org/jdk/pull/26735