Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1337582

Re: [PATCH v2 0/7] SLAB support for KASAN

From Alexander Potapenko <glider@google.com>
Newsgroups linux.kernel
Subject Re: [PATCH v2 0/7] SLAB support for KASAN
Date 2016-02-18 18:50 +0100
Message-ID <r3ASf-CA-9@gated-at.bofh.it> (permalink)
References <r3Apc-pQ-15@gated-at.bofh.it> <r3AIy-yZ-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Indeed, CONFIG_SLUB_DEBUG is not an issue by itself.

The biggest problem is the stack trace bookkeeping which currently
(with SLUB) requires 128 bytes for each allocation and deallocation
stack, bloating each memory object by 256 bytes.
If we make KASAN use the stack depot with SLUB we'll save a lot of memory.

On Thu, Feb 18, 2016 at 6:32 PM, Christoph Lameter <cl@linux.com> wrote:
> On Thu, 18 Feb 2016, Alexander Potapenko wrote:
>
>> Unlike SLUB, SLAB doesn't store allocation/deallocation stacks for heap
>> objects, therefore we reimplement this feature in mm/kasan/stackdepot.c.
>> The intention is to ultimately switch SLUB to use this implementation as
>> well, which will remove the dependency on SLUB_DEBUG.
>
> This needs to be clarified a bit. CONFIG_SLUB_DEBUG is on by default. So
> the dependency does not matter much. I think you depend on the slowpath
> debug processing right? The issue is that you want to do these things in
> the fastpath?
>



-- 
Alexander Potapenko
Software Engineer

Google Germany GmbH
Erika-Mann-Straße, 33
80636 München

Geschäftsführer: Matthew Scott Sucherman, Paul Terence Manicle
Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg
Diese E-Mail ist vertraulich. Wenn Sie nicht der richtige Adressat sind,
leiten Sie diese bitte nicht weiter, informieren Sie den
Absender und löschen Sie die E-Mail und alle Anhänge. Vielen Dank.
This e-mail is confidential. If you are not the right addressee please
do not forward it, please inform the sender, and please erase this
e-mail including any attachments. Thanks.

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH v2 0/7] SLAB support for KASAN Alexander Potapenko <glider@google.com> - 2016-02-18 18:20 +0100
  [PATCH v2 7/7] mm: kasan: Initial memory quarantine implementation Alexander Potapenko <glider@google.com> - 2016-02-18 18:20 +0100
  [PATCH v2 2/7] mm, kasan: SLAB support Alexander Potapenko <glider@google.com> - 2016-02-18 18:20 +0100
  [PATCH v2 6/7] kasan: Test fix: Warn if the UAF could not be detected in kmalloc_uaf2 Alexander Potapenko <glider@google.com> - 2016-02-18 18:20 +0100
  Re: [PATCH v2 0/7] SLAB support for KASAN Christoph Lameter <cl@linux.com> - 2016-02-18 18:40 +0100
    Re: [PATCH v2 0/7] SLAB support for KASAN Alexander Potapenko <glider@google.com> - 2016-02-18 18:50 +0100

csiph-web