> On Nov 28, 2018, at 5:07 AM, Thomas Gleixner <tglx@xxxxxxxxxxxxx> wrote: > > On Wed, 28 Nov 2018, Vitaly Kuznetsov wrote: > >> Nadav Amit <nadav.amit@xxxxxxxxx> writes: >> >>> On a different note: how come all of the hyper-v structs are not marked >>> with the “packed" attribute? >> >> "packed" should not be needed with proper padding; I vaguely remember >> someone (from x86@?) arguing _against_ "packed". > > Packed needs to be used, when describing fixed format data structures in > hardware or other ABIs, so the compiler cannot put alignment holes into > them. > > Using packed for generic data structures might result in suboptimal layouts > and prevents layout randomization. Right, I forgot about the structs randomization. So at least for it, the attribute should be needed. To prevent conflicts, I think that this series should also add the attribute in a first patch, which would be tagged for stable.