From: David Hildenbrand <david@redhat.com>
To: Christopher Lameter <cl@linux.com>, Qian Cai <cai@lca.pw>
Cc: lijiazi <jqqlijiazi@gmail.com>, Pekka Enberg <penberg@kernel.org>,
David Rientjes <rientjes@google.com>,
Joonsoo Kim <iamjoonsoo.kim@lge.com>,
Andrew Morton <akpm@linux-foundation.org>,
lijiazi <lijiazi@xiaomi.com>,
linux-mm@kvack.org
Subject: Re: [PATCH] slub: call BUG if next_object is not valid
Date: Thu, 9 Jan 2020 14:43:56 +0100 [thread overview]
Message-ID: <5f4267dd-1e3f-5723-75a0-e63b36a9f296@redhat.com> (raw)
In-Reply-To: <alpine.DEB.2.21.2001031448150.5589@www.lameter.com>
On 03.01.20 15:49, Christopher Lameter wrote:
> On Fri, 3 Jan 2020, Qian Cai wrote:
>
>>> On Jan 3, 2020, at 6:17 AM, lijiazi <jqqlijiazi@gmail.com> wrote:
>>>
>>> If current object's memory is corrupted, there is a high
>>> probability that next_objext stored in it will be rewritten as an
>>> illegal value. It's better to check next_object this time than to
>>> encounter a illegal pointer in next slub alloc like the following:
>>
>> Rather than papering over the issue, the key to figure out is how was the current object memory corrupted?
>
> Yes and this is a performance critical path. Keep expensive operations out
> and enable them only if debugging is enabled.
>
VM_BUG_ON(!virt_addr_valid(next_object));
But I agree that this might be misplaces, because we certainly don't
want to add random memory corruption checks in many call paths.
--
Thanks,
David / dhildenb
prev parent reply other threads:[~2020-01-09 13:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-03 11:16 lijiazi
2020-01-03 12:48 ` Qian Cai
2020-01-03 14:49 ` Christopher Lameter
2020-01-09 13:43 ` David Hildenbrand [this message]
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=5f4267dd-1e3f-5723-75a0-e63b36a9f296@redhat.com \
--to=david@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=cai@lca.pw \
--cc=cl@linux.com \
--cc=iamjoonsoo.kim@lge.com \
--cc=jqqlijiazi@gmail.com \
--cc=lijiazi@xiaomi.com \
--cc=linux-mm@kvack.org \
--cc=penberg@kernel.org \
--cc=rientjes@google.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox