From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755361AbeAMS0b (ORCPT + 1 other); Sat, 13 Jan 2018 13:26:31 -0500 Received: from mail-wm0-f67.google.com ([74.125.82.67]:33901 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755313AbeAMS0Y (ORCPT ); Sat, 13 Jan 2018 13:26:24 -0500 X-Google-Smtp-Source: ACJfBouCTFYLmYUPdq1/oPyJt00N2DsqClTHauW5Jo0cPHBBVdoZq7krQomBHsVcANwkrlCagXzrLQ== Date: Sat, 13 Jan 2018 21:26:21 +0300 From: "Kirill A. Shutemov" To: Ingo Molnar Cc: "Kirill A. Shutemov" , Ingo Molnar , Andrew Morton , x86@kernel.org, Thomas Gleixner , "H. Peter Anvin" , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Dave Young , Baoquan He , Vivek Goyal , kexec@lists.infradead.org, stable@vger.kernel.org Subject: Re: [PATCH] kdump: Write a correct address of mem_section into vmcoreinfo Message-ID: <20180113182621.vypecadghlokdxta@node.shutemov.name> References: <20180112162532.35896-1-kirill.shutemov@linux.intel.com> <20180113104838.ht57uooqk3fo546o@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180113104838.ht57uooqk3fo546o@gmail.com> User-Agent: NeoMutt/20171215 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On Sat, Jan 13, 2018 at 11:48:38AM +0100, Ingo Molnar wrote: > > * Kirill A. Shutemov wrote: > > > Depending on configuration mem_section can now be an array or a pointer > > to an array allocated dynamically. In most cases, we can continue to refer > > to it as 'mem_section' regardless of what it is. > > > > But there's one exception: '&mem_section' means "address of the array" if > > mem_section is an array, but if mem_section is a pointer, it would mean > > "address of the pointer". > > > > We've stepped onto this in kdump code. VMCOREINFO_SYMBOL(mem_section) > > writes down address of pointer into vmcoreinfo, not array as we wanted. > > > > Let's introduce VMCOREINFO_SYMBOL_ARRAY() that would handle the > > situation correctly for both cases. > > > > Signed-off-by: Kirill A. Shutemov > > Fixes: 83e3c48729d9 ("mm/sparsemem: Allocate mem_section at runtime for CONFIG_SPARSEMEM_EXTREME=y") > > Cc: stable@vger.kernel.org > > Acked-by: Baoquan He > > Acked-by: Dave Young > > You forgot the Reported-by - I added that to the commit. Oops, sorry. Note, that Andrew has already pick it up and sent it upstream. -- Kirill A. Shutemov