This is an AI-generated review of your patch. The human sending this email has considered the AI review valid, or at least plausible.
For local reproduction steps see https://netdev-ai.bots.linux.dev/ai-local.html --- ixgbe: fix unaligned u32 access in ixgbe_update_flash_X550() This commit adds a u32 member to union ixgbe_hic_hdr2 to ensure 4-byte alignment on the stack, preventing unaligned 32-bit accesses when ixgbe_host_interface_command() treats the buffer as a u32 array. > ixgbe: fix unaligned u32 access in ixgbe_update_flash_X550() > > ixgbe_host_interface_command() treats its buffer as a u32 array. The > local buffer we pass in was a union of byte-sized fields, which gives > it 1-byte alignment on the stack. On strict-align architectures this > can cause unaligned 32-bit accesses. > > Add a u32 member to union ixgbe_hic_hdr2 so the object is 4-byte > aligned, and pass the u32 member when calling > ixgbe_host_interface_command(). > > No functional change on x86; prevents unaligned accesses on > architectures that enforce natural alignment. > > Fixes: 49425dfc7451 ("ixgbe: Add support for x550em_a 10G MAC type") Does this Fixes tag point to the correct commit? The alignment issue appears to have been introduced by commit 6a14ee0cfb19 ("ixgbe: Add X550 support function pointers") from 2014-12-05, which introduced both the union ixgbe_hic_hdr2 without a u32 member for proper alignment and the ixgbe_update_flash_X550() function that passes this buffer to ixgbe_host_interface_command(). Commit 49425dfc7451 from 2016-04-01 only added support for the x550em_a MAC type and did not introduce the alignment bug. Should the Fixes tag be: Fixes: 6a14ee0cfb19 ("ixgbe: Add X550 support function pointers") > diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h > b/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h > index 61f2ef67defd..eb5bf3b6bbb5 100644 > --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h > +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h > @@ -2798,6 +2798,7 @@ struct ixgbe_hic_hdr2_rsp { > }; > > union ixgbe_hic_hdr2 { > + u32 buf[1]; > struct ixgbe_hic_hdr2_req req; > struct ixgbe_hic_hdr2_rsp rsp; > }; [ ... ]
