From: Sasha Levin <sasha.levin@oracle.com>
To: Dave Hansen <dave.hansen@intel.com>, Hugh Dickins <hughd@google.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
mgorman@suse.de
Subject: Re: [PATCH 0/5] mm: poison critical mm/ structs
Date: Wed, 08 Oct 2014 12:43:57 -0400 [thread overview]
Message-ID: <543569CD.4060309@oracle.com> (raw)
In-Reply-To: <54346623.6000309@intel.com>
On 10/07/2014 06:16 PM, Dave Hansen wrote:
> On 10/02/2014 07:58 AM, Sasha Levin wrote:
>>>> What does this add on top of slab poisoning? Some checks in some
>>>> mm places while the object is active, I guess: why not base those
>>>> on slab poisoning? And add them in as appropriate to the problem
>>>> at hand, when a problem is seen.
>> The extra you're getting is detecting corruption that happened
>> inside the object rather than around it.
>
> Isn't this more akin to redzoning that poisoning?
>
> I'm not sure I follow the logic here. The poison is inside the object,
> but it's now at the edges. With slub at least, you get a redzone right
> after the object(s):
>
> { OBJ } | REDZONE | { OBJ } | REDZONE | ...
>
> With this patch, you'd get something along these lines:
>
> { POISON | OBJ | POISON } { POISON | OBJ | POISON } ...
>
> So if somebody overflows OBJ, they'll hit the redzone/poison in either
> case. If they're randomly scribbling on memory, their likelihood of
> hitting the redzone/poison is proportional to the size of the
> redzone/poison.
>
> The only place this really helps is if someone overflows from a
> non-redzoned page or structure in to the beginning of a slub redzoned
> one. The fact that the redzone is at the end means we'll miss it.
>
> But, all that means is that we should probably add redzones to the
> beginning of slub objects, not just the end. That doesn't help us with
> 'struct page' of course, but it does for the mm_struct and vma.
This patchset is based on an actual issue we're seeing where the vma
gets corrupted without triggering any of the slub redzones.
Testing this patchset locally confirmed that while slub redzones stay
intact, the poison fields get overwritten - so now we're able to catch
the corruption after it happened.
I'm not sure what's the scenario that causes that, but once we figure
that out I could have a better response to your question...
Thanks,
Sasha
--
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:[~2014-10-08 16:44 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-30 1:47 [PATCH 0/5] mm: poison critical mm/ structs Sasha Levin
2014-09-30 1:47 ` [PATCH 1/5] mm: add poisoning basics Sasha Levin
2014-09-30 1:47 ` [PATCH 2/5] mm: constify dump_page and friends Sasha Levin
2014-09-30 1:47 ` [PATCH 3/5] mm: poison mm_struct Sasha Levin
2014-09-30 1:47 ` [PATCH 4/5] mm: poison vm_area_struct Sasha Levin
2014-09-30 1:47 ` [PATCH 5/5] mm: poison page struct Sasha Levin
2014-10-07 22:02 ` Dave Hansen
2014-10-08 7:10 ` Christoph Lameter
2014-10-08 14:22 ` Sasha Levin
2014-10-01 21:07 ` [PATCH 0/5] mm: poison critical mm/ structs Andrew Morton
2014-10-01 21:39 ` Sasha Levin
2014-10-01 21:48 ` Andrew Morton
2014-10-02 3:51 ` Sasha Levin
2014-10-02 9:23 ` Hugh Dickins
2014-10-02 14:58 ` Sasha Levin
2014-10-07 22:16 ` Dave Hansen
2014-10-08 16:43 ` Sasha Levin [this message]
2014-10-02 15:13 ` Dave Jones
2014-10-09 19:11 ` Sasha Levin
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=543569CD.4060309@oracle.com \
--to=sasha.levin@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=dave.hansen@intel.com \
--cc=hughd@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@suse.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).