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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170209042229.GA4311@zzz>
Date:   Wed, 8 Feb 2017 20:22:29 -0800
From:   Eric Biggers <ebiggers3@...il.com>
To:     Hoeun Ryu <hoeun.ryu@...il.com>
Cc:     Andrew Morton <akpm@...ux-foundation.org>,
        Michal Hocko <mhocko@...e.com>, Ingo Molnar <mingo@...nel.org>,
        Andy Lutomirski <luto@...nel.org>,
        Kees Cook <keescook@...omium.org>,
        "Eric W. Biederman" <ebiederm@...ssion.com>,
        Mateusz Guzik <mguzik@...hat.com>,
        linux-kernel@...r.kernel.org, kernel-hardening@...ts.openwall.com
Subject: Re: [kernel-hardening] [PATCH v2 1/2] fork: free vmapped stacks in
 cache when cpus are offline

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?

- Eric

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ