aboutsummaryrefslogtreecommitdiff
path: root/hdata
diff options
context:
space:
mode:
authorStewart Smith <stewart@linux.vnet.ibm.com>2017-08-23 12:14:47 +1000
committerStewart Smith <stewart@linux.vnet.ibm.com>2017-08-24 12:59:15 +1000
commit9735fcf71abbb23c4621f1371734b785b18fb075 (patch)
tree58964b462a4185415d4854c9e45878bb192a29d2 /hdata
parent70e6d803a61093a3d5a89500730e310c62e6de2f (diff)
downloadskiboot-9735fcf71abbb23c4621f1371734b785b18fb075.zip
skiboot-9735fcf71abbb23c4621f1371734b785b18fb075.tar.gz
skiboot-9735fcf71abbb23c4621f1371734b785b18fb075.tar.bz2
hdata: Reduce 'struct HDIF_array_hdr' alignment to 4 bytes
UBSan threw up the following: hdata/test/../hdif.c:96:9: runtime error: member access within misaligned address 0x7f9ad8b02c18 for type 'const struct HDIF_array_hdr', which requires 16 byte alignment 0x7f9ad8b02c18: note: pointer points here 00 00 00 00 00 00 00 10 00 00 00 08 00 00 00 14 00 00 00 14 00 00 00 20 00 00 00 00 80 03 ff ff ^ Real data we're parsing doesn't enforce that alignment requirement, so we shouldn't rely on it. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'hdata')
-rw-r--r--hdata/hdif.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/hdata/hdif.h b/hdata/hdif.h
index ef03522..22345b3 100644
--- a/hdata/hdif.h
+++ b/hdata/hdif.h
@@ -44,7 +44,7 @@ struct HDIF_array_hdr {
__be32 ecnt;
__be32 esize;
__be32 eactsz;
-} __packed __align(0x10);
+} __packed __align(0x4);
struct HDIF_child_ptr {
__be32 offset;