From: Imran Khan <imran.f.khan@oracle.com>
To: Marco Elver <elver@google.com>
Cc: glider@google.com, dvyukov@google.com, cl@linux.com,
penberg@kernel.org, rientjes@google.com, iamjoonsoo.kim@lge.com,
akpm@linux-foundation.org, vbabka@suse.cz,
roman.gushchin@linux.dev, 42.hyeyoo@gmail.com,
linux-kernel@vger.kernel.org, kasan-dev@googlegroups.com,
linux-mm@kvack.org
Subject: Re: [RFC PATCH] Introduce sysfs interface to disable kfence for selected slabs.
Date: Thu, 11 Aug 2022 19:04:20 +1000 [thread overview]
Message-ID: <8fcf8e26-5d96-85c9-bc55-8bee7a2444c4@oracle.com> (raw)
In-Reply-To: <CANpmjNNDy5-OssTWP6sm7r0BOFkBVdOa1_ZsPWGQOKjLwGZoCQ@mail.gmail.com>
Hello,
On 11/8/22 6:40 pm, Marco Elver wrote:
> On Thu, 11 Aug 2022 at 09:26, Imran Khan <imran.f.khan@oracle.com> wrote:
>>
>> By default kfence allocation can happen for any slab object, whose size
>> is up to PAGE_SIZE, as long as that allocation is the first allocation
>> after expiration of kfence sample interval. But in certain debugging
>> scenarios we may be interested in debugging corruptions involving
>> some specific slub objects like dentry or ext4_* etc. In such cases
>> limiting kfence for allocations involving only specific slub objects
>> will increase the probablity of catching the issue since kfence pool
>> will not be consumed by other slab objects.
>>
>> This patch introduces a sysfs interface '/sys/kernel/slab/<name>/skip_kfence'
>> to disable kfence for specific slabs. Having the interface work in this
>> way does not impact current/default behavior of kfence and allows us to
>> use kfence for specific slabs (when needed) as well. The decision to
>> skip/use kfence is taken depending on whether kmem_cache.flags has
>> (newly introduced) SLAB_SKIP_KFENCE flag set or not.
>>
>> Signed-off-by: Imran Khan <imran.f.khan@oracle.com>
>> ---
>>
>> This RFC patch is implementing the sysfs work mentioned in [1]. Since the
>> approach taken in [1] was not proper, I am sending this RFC patch as a
>> separate change.
>
> This design is much simpler and looks good to me. Feel free to send as
> a non-RFC.
>
Thanks for reviewing this. I have sent non-RFC version of this change.
Thanks,
-- Imran
prev parent reply other threads:[~2022-08-11 9:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-11 7:25 Imran Khan
2022-08-11 8:40 ` Marco Elver
2022-08-11 9:04 ` Imran Khan [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=8fcf8e26-5d96-85c9-bc55-8bee7a2444c4@oracle.com \
--to=imran.f.khan@oracle.com \
--cc=42.hyeyoo@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=cl@linux.com \
--cc=dvyukov@google.com \
--cc=elver@google.com \
--cc=glider@google.com \
--cc=iamjoonsoo.kim@lge.com \
--cc=kasan-dev@googlegroups.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=penberg@kernel.org \
--cc=rientjes@google.com \
--cc=roman.gushchin@linux.dev \
--cc=vbabka@suse.cz \
/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