From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
To: Gavin Shan <gwshan@linux.vnet.ibm.com>,
Michael Ellerman <mpe@ellerman.id.au>
Cc: Gavin Shan <gwshan@linux.vnet.ibm.com>,
linux-mm@kvack.org, linuxppc-dev@lists.ozlabs.org,
mgorman@suse.de, zhlcindy@linux.vnet.ibm.com
Subject: Re: [RFC] mm: Fix memory corruption caused by deferred page initialization
Date: Mon, 28 Mar 2016 19:50:37 +0530 [thread overview]
Message-ID: <87zitismyy.fsf@linux.vnet.ibm.com> (raw)
In-Reply-To: <20160326133708.GA382@gwshan>
Gavin Shan <gwshan@linux.vnet.ibm.com> writes:
> [ text/plain ]
> On Sat, Mar 26, 2016 at 08:47:17PM +1100, Michael Ellerman wrote:
>>Hi Gavin,
>>
>>On Fri, 2016-25-03 at 16:05:29 UTC, Gavin Shan wrote:
>>> During deferred page initialization, the pages are moved from memblock
>>> or bootmem to buddy allocator without checking they were reserved. Those
>>> reserved pages can be reallocated to somebody else by buddy/slab allocator.
>>> It leads to memory corruption and potential kernel crash eventually.
>>
>>Can you give me a bit more detail on what the bug is?
>>
>>I haven't seen any issues on my systems, but I realise now I haven't enabled
>>DEFERRED_STRUCT_PAGE_INIT - I assumed it was enabled by default.
>>
>>How did this get tested before submission?
>
.....
> I think this patch is generic one. I guess bootmem might be supported on other
> platforms other than PPC? If that's the case, it would be fine to have the code
> fixing the bootmem bitmap if you agree. If you want me to split the patch into
> two for bootmem and memblock cases separately, I can do it absolutely. Please
> let me know your preference :-)
>
IMHO it would make it simpler if you split this into two patch. Also
avoid doing variable renames in the patch.
-aneesh
WARNING: multiple messages have this Message-ID (diff)
From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
To: Gavin Shan <gwshan@linux.vnet.ibm.com>,
Michael Ellerman <mpe@ellerman.id.au>
Cc: linux-mm@kvack.org, linuxppc-dev@lists.ozlabs.org,
mgorman@suse.de, zhlcindy@linux.vnet.ibm.com
Subject: Re: [RFC] mm: Fix memory corruption caused by deferred page initialization
Date: Mon, 28 Mar 2016 19:50:37 +0530 [thread overview]
Message-ID: <87zitismyy.fsf@linux.vnet.ibm.com> (raw)
In-Reply-To: <20160326133708.GA382@gwshan>
Gavin Shan <gwshan@linux.vnet.ibm.com> writes:
> [ text/plain ]
> On Sat, Mar 26, 2016 at 08:47:17PM +1100, Michael Ellerman wrote:
>>Hi Gavin,
>>
>>On Fri, 2016-25-03 at 16:05:29 UTC, Gavin Shan wrote:
>>> During deferred page initialization, the pages are moved from memblock
>>> or bootmem to buddy allocator without checking they were reserved. Those
>>> reserved pages can be reallocated to somebody else by buddy/slab allocator.
>>> It leads to memory corruption and potential kernel crash eventually.
>>
>>Can you give me a bit more detail on what the bug is?
>>
>>I haven't seen any issues on my systems, but I realise now I haven't enabled
>>DEFERRED_STRUCT_PAGE_INIT - I assumed it was enabled by default.
>>
>>How did this get tested before submission?
>
.....
> I think this patch is generic one. I guess bootmem might be supported on other
> platforms other than PPC? If that's the case, it would be fine to have the code
> fixing the bootmem bitmap if you agree. If you want me to split the patch into
> two for bootmem and memblock cases separately, I can do it absolutely. Please
> let me know your preference :-)
>
IMHO it would make it simpler if you split this into two patch. Also
avoid doing variable renames in the patch.
-aneesh
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2016-03-28 14:21 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-25 16:05 [PATCH RFC] mm: Fix memory corruption caused by deferred page initialization Gavin Shan
2016-03-25 16:05 ` Gavin Shan
2016-03-26 9:47 ` [RFC] " Michael Ellerman
2016-03-26 9:47 ` Michael Ellerman
2016-03-26 13:37 ` Gavin Shan
2016-03-26 13:37 ` Gavin Shan
2016-03-27 13:48 ` Gavin Shan
2016-03-27 13:48 ` Gavin Shan
2016-03-31 2:27 ` Gavin Shan
2016-03-31 2:27 ` Gavin Shan
2016-04-04 8:39 ` Mel Gorman
2016-04-04 8:39 ` Mel Gorman
2016-04-04 11:24 ` Gavin Shan
2016-04-04 11:24 ` Gavin Shan
2016-03-28 14:20 ` Aneesh Kumar K.V [this message]
2016-03-28 14:20 ` Aneesh Kumar K.V
2016-03-29 5:13 ` Li Zhang
2016-03-29 5:13 ` Li Zhang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87zitismyy.fsf@linux.vnet.ibm.com \
--to=aneesh.kumar@linux.vnet.ibm.com \
--cc=gwshan@linux.vnet.ibm.com \
--cc=linux-mm@kvack.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mgorman@suse.de \
--cc=mpe@ellerman.id.au \
--cc=zhlcindy@linux.vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.