Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 5 Dec 2018 15:00:49 -0800
From: Kees Cook <>
To: Carter Cheng <>
Cc: Kernel Hardening <>
Subject: Re: dynamically allocating memory in the kernel

On Wed, Dec 5, 2018 at 12:46 PM Carter Cheng <> wrote:
> Hello,
> I was wondering if someone here could help me understand something about the kernel for a project I am working on tracking dynamically allocated memory. How many ways are there to dynamically allocate memory in the kernel presently? I know of 4.
> get_free_pages family of functions
> kmalloc family (including vmalloc)

vmalloc is quite different from kmalloc (see below).

> slab allocation

kmalloc is a type of slab allocation, so the base parts are the same.

> mempools.
> Are there others? I am trying to track them all down so I have comprehensively know when all allocations occur and all "frees".

I would recommend looking at KASAN hooks (which tracks use-after-free)
to see if there are any areas you're missing.


Kees Cook

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.