lkml.org 
[lkml]   [2013]   [Jan]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v7u1 20/31] x86, kexec: replace ident_mapping_init and init_level4_page
On Fri, Jan 04, 2013 at 02:04:05PM -0800, Yinghai Lu wrote:
> On Fri, Jan 4, 2013 at 1:01 PM, Borislav Petkov <bp@alien8.de> wrote:
> > On Thu, Jan 03, 2013 at 04:48:40PM -0800, Yinghai Lu wrote:
> >> static int init_pgtable(struct kimage *image, unsigned long start_pgtable)
> >> {
> >> + struct x86_mapping_info info = {
> >> + .alloc_pgt_page = alloc_pgt_page,
> >> + .context = image,
> >> + .pmd_flag = __PAGE_KERNEL_LARGE_EXEC,
> >> + };
> >
> > This is leaving ->kernel_mapping uninitialized to contain a random,
> > previous stack value. I don't think we want that.
>
> that should be initialized to false by default.

So make it explicit. You can't possibly rely on what the stack contains
when you allocate that struct there.

--
Regards/Gruss,
Boris.


\
 
 \ /
  Last update: 2013-01-05 15:01    [W:0.232 / U:0.168 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site