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


Groups > linux.kernel > #1577591

Re: [kernel-hardening] [PATCH v2 1/2] fork: free vmapped stacks in cache when cpus are offline

From Hoeun Ryu <hoeun.ryu@gmail.com>
Newsgroups linux.kernel
Subject Re: [kernel-hardening] [PATCH v2 1/2] fork: free vmapped stacks in cache when cpus are offline
Date 2017-02-09 14:40 +0100
Message-ID <t8X75-6JS-59@gated-at.bofh.it> (permalink)
References <t8On7-1bs-11@gated-at.bofh.it> <t8OZP-1oK-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, Feb 9, 2017 at 1:22 PM, Eric Biggers <ebiggers3@gmail.com> wrote:
> Hi Hoeun,
>
> On Thu, Feb 09, 2017 at 01:03:46PM +0900, Hoeun Ryu wrote:
>> +static int free_vm_stack_cache(unsigned int cpu)
>> +{
>> +     int i;
>> +
>> +     for (i = 0; i < NR_CACHED_STACKS; i++) {
>> +             struct vm_struct *vm_stack = this_cpu_read(cached_stacks[i]);
>> +             if (!vm_stack)
>> +                     continue;
>> +
>> +             vfree(vm_stack->addr);
>> +             this_cpu_write(cached_stacks[i], NULL);
>> +     }
>> +
>> +     return 0;
>> +}
>
> Doesn't this need to free the stacks for the 'cpu' that's passed in, instead of
> "this" CPU?
>

Sorry, Thank you for your correction. I will fix this.

> - Eric

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


Thread

[PATCH v2 1/2] fork: free vmapped stacks in cache when cpus are offline Hoeun Ryu <hoeun.ryu@gmail.com> - 2017-02-09 05:20 +0100
  Re: [kernel-hardening] [PATCH v2 2/2] fork: make number of cached  stacks (vmapped) configurable using Kbuild Eric Biggers <ebiggers3@gmail.com> - 2017-02-09 05:30 +0100
  [PATCH v2 2/2] fork: make number of cached stacks (vmapped) configurable using Kbuild Hoeun Ryu <hoeun.ryu@gmail.com> - 2017-02-09 05:40 +0100
    Re: [PATCH v2 2/2] fork: make number of cached stacks (vmapped)  configurable using Kbuild Michal Hocko <mhocko@kernel.org> - 2017-02-09 09:50 +0100
      Re: [PATCH v2 2/2] fork: make number of cached stacks (vmapped)  configurable using Kbuild Hoeun Ryu <hoeun.ryu@gmail.com> - 2017-02-09 14:40 +0100
  Re: [kernel-hardening] [PATCH v2 1/2] fork: free vmapped stacks in  cache when cpus are offline Eric Biggers <ebiggers3@gmail.com> - 2017-02-09 06:00 +0100
    Re: [kernel-hardening] [PATCH v2 1/2] fork: free vmapped stacks in  cache when cpus are offline Hoeun Ryu <hoeun.ryu@gmail.com> - 2017-02-09 14:40 +0100
  Re: [PATCH v2 1/2] fork: free vmapped stacks in cache when cpus are  offline kbuild test robot <lkp@intel.com> - 2017-02-09 08:40 +0100
  Re: [PATCH v2 1/2] fork: free vmapped stacks in cache when cpus are  offline Michal Hocko <mhocko@kernel.org> - 2017-02-09 10:00 +0100
    Re: [PATCH v2 1/2] fork: free vmapped stacks in cache when cpus are offline Hoeun Ryu <hoeun.ryu@gmail.com> - 2017-02-09 14:40 +0100
  Re: [PATCH v2 1/2] fork: free vmapped stacks in cache when cpus are  offline kbuild test robot <lkp@intel.com> - 2017-02-09 11:20 +0100

csiph-web