From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760239AbYDPAfd (ORCPT ); Tue, 15 Apr 2008 20:35:33 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752695AbYDPAfU (ORCPT ); Tue, 15 Apr 2008 20:35:20 -0400 Received: from mx2.mail.elte.hu ([157.181.151.9]:34475 "EHLO mx2.mail.elte.hu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751797AbYDPAfS (ORCPT ); Tue, 15 Apr 2008 20:35:18 -0400 Date: Wed, 16 Apr 2008 02:34:49 +0200 From: Ingo Molnar To: Linus Torvalds Cc: Pekka Enberg , Christoph Lameter , linux-kernel@vger.kernel.org, Mel Gorman , Nick Piggin , Andrew Morton , "Rafael J. Wysocki" , Yinghai.Lu@sun.com, apw@shadowen.org, KAMEZAWA Hiroyuki Subject: Re: [patch] mm: sparsemem memory_present() memory corruption fix Message-ID: <20080416003449.GA26633@elte.hu> References: <20080415161532.GA15088@elte.hu> <20080415195430.GA23015@elte.hu> <20080415201734.GA25628@elte.hu> <4805115D.5030703@cs.helsinki.fi> <20080415204025.GA29784@elte.hu> <20080416000356.GA24737@elte.hu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080416000356.GA24737@elte.hu> User-Agent: Mutt/1.5.17 (2007-11-01) X-ELTE-VirusStatus: clean X-ELTE-SpamScore: -1.5 X-ELTE-SpamLevel: X-ELTE-SpamCheck: no X-ELTE-SpamVersion: ELTE 2.0 X-ELTE-SpamCheck-Details: score=-1.5 required=5.9 tests=BAYES_00 autolearn=no SpamAssassin version=3.2.3 -1.5 BAYES_00 BODY: Bayesian spam probability is 0 to 1% [score: 0.0000] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org small addendum to the changelog: > if (!ms->section_mem_map) > ms->section_mem_map = sparse_encode_early_nid(nid) | + | SECTION_MARKED_PRESENT > > 'ms' will be out of bounds and we'll corrupt a small amount of memory by > encoding the node ID. Depending on what that memory is, we might crash, > misbehave or just not notice the bug. the corruption might happen when encoding a non-zero node ID, or due to the SECTION_MARKED_PRESENT which is 0x1: mmzone.h:#define SECTION_MARKED_PRESENT (1UL<<0) Ingo