From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752085AbbDCHER (ORCPT ); Fri, 3 Apr 2015 03:04:17 -0400 Received: from mx1.redhat.com ([209.132.183.28]:58370 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751741AbbDCHEO (ORCPT ); Fri, 3 Apr 2015 03:04:14 -0400 Date: Fri, 3 Apr 2015 15:03:47 +0800 From: Dave Young To: Yasuaki Ishimatsu Cc: Xishi Qiu , x86@kernel.org, linux-kernel@vger.kernel.org, tglx@linutronix.de, bhe@redhat.com, mingo@redhat.com, hpa@zytor.com, akpm@linux-foundation.org Subject: Re: [PATCH] x86/numa: kernel stack corruption fix Message-ID: <20150403070347.GB22579@dhcp-128-53.nay.redhat.com> References: <20150401045346.GA3461@dhcp-16-198.nay.redhat.com> <20150401051133.GC8680@dhcp-128-53.nay.redhat.com> <551B9DD7.5010603@huawei.com> <20150401074120.GF8680@dhcp-128-53.nay.redhat.com> <551d9535.87628c0a.5324.7358@mx.google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <551d9535.87628c0a.5324.7358@mx.google.com> User-Agent: Mutt/1.5.22.1-rc1 (2013-10-16) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > > >> > > > >> 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