lkml.org 
[lkml]   [2019]   [Apr]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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@linux.intel.com>

--
Kirill A. Shutemov

\
 
 \ /
  Last update: 2019-04-29 15:16    [W:0.052 / U:2.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site