https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20260831135117.574836-1-sw%40simonwunderlich.de?part=7 > > An u8 array in structures have a natural alignment of only 1 byte. An > > u8[ETH_ALEN] array must therefore be assumed to only be 1 byte aligned. But > > many etherdevices.h functions are requiring a 2 byte (u16) alignment. > > > > All these addresses were either on the start of a struct or after a struct > > member which required at least an alignment of 2 byte. Still, annote all > > u8[ETH_ALEN] arrays on the stack as __aligned(2) to make sure that this > > assumption isn't broken by other modifications inside the structs. > > Discovered by: gpt-5-6-sol, opus-5 · Missed by: sashiko-gemini > Should "arrays on the stack" read "arrays in structs" here? Yes, copy+paste error. Minor for this PR > > diff --git a/net/batman-adv/types.h b/net/batman-adv/types.h > > index 99667f632d4d..c42a4aa8f41a 100644 > > --- a/net/batman-adv/types.h > > +++ b/net/batman-adv/types.h > > [ ... ] > > > @@ -634,12 +634,12 @@ struct batadv_hardif_neigh_node { > > struct hlist_node list; > > > > /** @addr: the MAC address of the neighboring interface */ > > - u8 addr[ETH_ALEN]; > > + u8 addr[ETH_ALEN] __aligned(2); > > > > /** > > * @orig: the address of the originator this neighbor node belongs to > > */ > > - u8 orig[ETH_ALEN]; > > + u8 orig[ETH_ALEN] __aligned(2); > > Discovered by: gpt-5-6-sol, opus-5 · Missed by: sashiko-gemini > Is the claim "All these addresses were either on the start of a struct or > after a struct member which required at least an alignment of 2 byte" > accurate for batadv_hardif_neigh_node.orig? > > That member directly follows u8 addr[ETH_ALEN], which only requires 1 byte > alignment; orig ends up on an even offset because ETH_ALEN happens to be > even, not because the preceding member forces 2 byte alignment. Would it > be worth rewording that sentence? But the struct member required indirectly an aligned of 2 bytes Regards, Sven