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 <kir...@linux.intel.com>

-- 
 Kirill A. Shutemov

Reply via email to