Re: [PATCH] x86/numa: kernel stack corruption fix

From: Dave Young
Date: Fri Apr 03 2015 - 03:04:22 EST


> > > >>
> > > >> The above reserved region includes 0x40004000, a page excluded in
> > > >> trim_snb_memory. For this memblock reserved region the nid is not set it is
> > > >> still default value MAX_NUMNODES. later node_set callback will set bit
> > > >> MAX_NUMNODES in nodemask bitmap thus stack corruption happen.
> > > >>
> > >
> > > Hi Dave,
> > >
> > > Is it means, first reserved region 0x40000000 - 0x40100000, then boot the kdump
> > > kernel, so this region is not include in "numa_meminfo", and memblock.reserved
> > > (0x40004000) is still MAX_NUMNODES from trim_snb_memory().
> >
> > Right, btw, I booted kdump kernel with numa=off for saving memory.
> >
> > I suspect it will also be reproduced with mem=XYZ with normal kernel.
>
> Does the issue occur on your system with mem=0x40000000?
>
> I think the issue occurs when reserved memory range is not includes
> in system ram which informed by e820 or SRAT table. On your system,
> 0x40004000 is reserved by trim_snb_memory(). But if you use mem=0x40000000,
> the system ram is limited within 0x40000000. So the issue will occur.

It does occur with mem=800M during my previous test, I think it will occur with
mem=0x40000000 as well though I did not test mem=0x40000000.

Thanks
Dave
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/