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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 20 Oct 2021 11:46:38 +0000
From:   Hyeonggon Yoo <>
To:     Rustam Kovhaev <>
Subject: Re: [PATCH] slob: add size header to all allocations

On Sun, Oct 17, 2021 at 08:38:41PM -0700, Rustam Kovhaev wrote:
> Let's prepend all  allocations of (PAGE_SIZE - align_offset) and less
> with the size header. This way kmem_cache_alloc() memory can be freed
> with kfree() and the other way around, as long as they are less than
> (PAGE_SIZE - align_offset).

Hello Rustam, I measured its impact on memory usage on
tiny kernel configuration as SLOB is used in very small machine.

on x86 32 bit + tinyconfig:
    Slab:                668 kB

    Slab:                688~692 kB

it adds 20~24kB.

> The main reason for this change is to simplify SLOB a little bit, make
> it a bit easier to debug whenever something goes wrong.

It seems acceptable But I wonder it is worth to increase memory usage
to allow freeing kmem_cache_alloc-ed objects by kfree()?


> meminfo right after the system boot, without the patch:
> Slab:              35500 kB
> the same, with the patch:
> Slab:              36396 kB

Powered by blists - more mailing lists