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  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:   Sat, 4 Feb 2017 11:01:32 +0900
From:   Hoeun Ryu <>
To:     Andy Lutomirski <>
Cc:     Michal Hocko <>,
        Andrew Morton <>,
        Ingo Molnar <>,
        Andy Lutomirski <>,
        Kees Cook <>,
        "Eric W. Biederman" <>,
        Mateusz Guzik <>,
        "" <>,
Subject: Re: [PATCH 1/3] fork: dynamically allocate cache array for vmapped
 stacks using cpuhp

On Sat, Feb 4, 2017 at 2:52 AM, Andy Lutomirski <> wrote:
> On Fri, Feb 3, 2017 at 8:42 AM, Hoeun Ryu <> wrote:
>> On Sat, Feb 4, 2017 at 12:39 AM, Michal Hocko <> wrote:
>>> On Sat 04-02-17 00:30:05, Hoeun Ryu wrote:
>>>>  Using virtually mapped stack, kernel stacks are allocated via vmalloc.
>>>> In the current implementation, two stacks per cpu can be cached when
>>>> tasks are freed and the cached stacks are used again in task duplications.
>>>> but the array for the cached stacks is statically allocated by per-cpu api.
>>>>  In this new implementation, the array for the cached stacks are dynamically
>>>> allocted and freed by cpu hotplug callbacks and the cached stacks are freed
>>>> when cpu is down. setup for cpu hotplug is established in fork_init().
>>> Why do we want this? I can see that the follow up patch makes the number
>>> configurable but the changelog doesn't describe the motivation for that.
>>> Which workload would benefit from a higher value?
>> The key difference of this implementation, the cached stacks for a cpu
>> is freed when a cpu is down.
>> so the cached stacks are no longer wasted.
>> In the current implementation, the cached stacks for a cpu still
>> remain on the system when a cpu is down.
>> I think we could imagine what if a machine has many cpus and someone
>> wants to have bigger size of stack caches.
> Then how about just registering a simple hotplug hook to free the
> stacks without worrying about freeing the tiny array as well?

Michal, What do you think about it. it sounds fair enough.

> --Andy

Powered by blists - more mailing lists