> From: Roger Pau Monne <[email protected]> > Sent: Friday, April 14, 2023 4:19 PM > To: [email protected] <[email protected]> > Cc: Josh Poimboeuf <[email protected]>; Roger Pau Monne > <[email protected]>; Konrad Rzeszutek Wilk <[email protected]>; Ross > Lagerwall <[email protected]> > Subject: [PATCH] create-diff-object: handle missing padding at end of special > section > > From: Josh Poimboeuf <[email protected]> > > The paravirt_patch_site struct has 12 bytes of data and 4 bytes of > padding, for a total of 16 bytes. However, when laying out the structs > in the .parainstructions section, the vmlinux script only aligns before > each struct's data, not after. So the last entry doesn't have the > 4-byte padding, which breaks kpatch_regenerate_special_section()'s > assumption of a 16-byte struct, resulting in a memcpy past the end of > the section. > > Fixes #747. > > Signed-off-by: Josh Poimboeuf <[email protected]> > > This is commit: > > c2dc3836e862 create-diff-object: handle missing padding at end of special > section > > In kpatch repository. > > I've seen the .fixup section get an alignment of 16 but a size of 81, > which makes the error removed in this patch trigger. Overall I'm not > sure why the original alignment check was done against the size of the > section, the alignment applies to the address of the section, not its > size. > > Signed-off-by: Roger Pau Monné <[email protected]> > ---
Reviewed-by: Ross Lagerwall <[email protected]>
