> Date: Tue, 24 Dec 2019 07:52:14 +0100 > From: Micha� Górny <mgo...@gentoo.org> > > On Mon, 2019-12-23 at 16:17 +0000, Christos Zoulas wrote: > > In article <20191222164104.165346-2-mgo...@gentoo.org>, > > Micha� Górny <mgo...@gentoo.org> wrote: > > > Both desc and note header needs to be aligned. Therefore, we need > > > to realign after skipping past desc as well. > > > > Should probably be done with a standard alignment macro? > > Could you be more specific? I don't see any macro that would accept > actual alignment value. Well, besides STACK_ALIGN() but that seems to > do some weird casting, so I presume it's not semantically correct here.
Instead of + offset = ((offset + core_hdr.p_align - 1) + / core_hdr.p_align) * core_hdr.p_align; do + offset = roundup(offset, core_hdr.p_align);