From f5d723e8ee9bea235acb01453eb257ce094c11e9 Mon Sep 17 00:00:00 2001 From: Alexander Motin Date: Fri, 4 Oct 2024 11:01:55 -0400 Subject: [PATCH] ZAP: Align za_name in zap_attribute_t to 8 bytes Our code reading/writing there may not handle misaligned accesses on a platforms that may care about it. I don't see a point to complicate it to satisfy UBSan in CI. This alignment costs nothing. Fixes: #15921 Signed-off-by: Alexander Motin Sponsored by: iXsystems, Inc. --- include/sys/zap.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/sys/zap.h b/include/sys/zap.h index 43e8bbea1991..53166e094a72 100644 --- a/include/sys/zap.h +++ b/include/sys/zap.h @@ -377,6 +377,7 @@ typedef struct { uint64_t za_num_integers; uint64_t za_first_integer; /* no sign extension for <8byte ints */ uint32_t za_name_len; + uint32_t za_pad; /* We want za_name aligned to uint64_t. */ char za_name[]; } zap_attribute_t;