lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 2 Nov 2023 15:58:45 +0100
From:   Andrey Konovalov <andreyknvl@...il.com>
To:     Dmitry Vyukov <dvyukov@...gle.com>,
        Juntong Deng <juntong.deng@...look.com>
Cc:     ryabinin.a.a@...il.com, glider@...gle.com,
        vincenzo.frascino@....com, akpm@...ux-foundation.org,
        kasan-dev@...glegroups.com, linux-mm@...ck.org,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-kernel-mentees@...ts.linuxfoundation.org" 
        <linux-kernel-mentees@...ts.linuxfoundation.org>
Subject: Re: [RFC] mm/kasan: Add Allocation, Free, Error timestamps to KASAN report

On Tue, Oct 31, 2023 at 10:46 AM Dmitry Vyukov <dvyukov@...gle.com> wrote:
>
> > >>> There is also an aspect of memory consumption. KASAN headers increase
> > >>> the size of every heap object. So we tried to keep them as compact as
> > >>> possible. At some point CPU numbers and timestamps (IIRC) were already
> > >>> part of the header, but we removed them to shrink the header to 16
> > >>> bytes.

> > Do you think it is worth using the extra bytes to record more
> > information? If this is a user-configurable feature.
>
> If it's user-configurable, then it is OK.

FWIW, Generic KASAN already stores the auxiliary stack handles in the
redzone, so the size of the redzone header is 24 bytes. Perhaps, we
should hide them under a config as well.

However, the increase of the redzone header size will only affect
small kmalloc allocations (<= 16 bytes, as kmalloc allocations are
aligned to the size of the object and the redzone is thus as big as
the object anyway) and small non-kmalloc slab allocations (<= 64
bytes, for which optimal_redzone returns 16). So I don't think adding
new fields to the redzone will increase the memory usage by much. But
this needs to be tested to make sure.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ