[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20190429131612.y7ee2hbujeondcko@kshutemo-mobl1>
Date: Mon, 29 Apr 2019 16:16:12 +0300
From: "Kirill A. Shutemov" <kirill@...temov.name>
To: Baoquan He <bhe@...hat.com>
Cc: linux-kernel@...r.kernel.org, x86@...nel.org, tglx@...utronix.de,
mingo@...nel.org, bp@...en8.de, hpa@...or.com,
kirill.shutemov@...ux.intel.com, keescook@...omium.org,
peterz@...radead.org, thgarnie@...gle.com,
herbert@...dor.apana.org.au, mike.travis@....com,
frank.ramsay@....com, yamada.masahiro@...ionext.com
Subject: Re: [PATCH v3 RESEND 2/2] x86/mm/KASLR: Fix the size of vmemmap
section
On Mon, Apr 29, 2019 at 04:12:46PM +0800, Baoquan He wrote:
> > > + * Calculate how many TB vmemmap region needs, and aligned to
> > > + * 1TB boundary.
> > > + */
> > > + vmemmap_size = (kaslr_regions[0].size_tb << (TB_SHIFT - PAGE_SHIFT)) *
> > > + sizeof(struct page);
> >
> > Hm. Don't we need to take into account alignment requirements for struct
> > page here? I'm worried about some exotic debug kernel config where
> > sizeof(struct page) doesn't satify __alignof__(struct page).
>
> I know sizeof(struct page) has handled its own struct alignment and
> padding.
I didn't realize that. Sorry for the noise.
Acked-by: Kirill A. Shutemov <kirill@...ux.intel.com>
--
Kirill A. Shutemov
Powered by blists - more mailing lists