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] [day] [month] [year] [list]
Message-ID: <Z9ktgl8kVHGQ4FLH@tiehlicka>
Date: Tue, 18 Mar 2025 09:23:30 +0100
From: Michal Hocko <mhocko@...e.com>
To: "Uladzislau Rezki (Sony)" <urezki@...il.com>
Cc: LKML <linux-kernel@...r.kernel.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Christian Brauner <brauner@...nel.org>,
	Oleg Nesterov <oleg@...hat.com>, Tejun Heo <tj@...nel.org>,
	Oleksiy Avramchenko <oleksiy.avramchenko@...y.com>
Subject: Re: [PATCH] fork: Use __vmalloc_node() for stack allocation

On Mon 17-03-25 17:36:14, Uladzislau Rezki wrote:
> Replace __vmalloc_node_range() by the __vmalloc_node() function.
> The last variant requires less parameters and it uses exactly the
> same arguments which are partly now hidden inside __vmalloc_node()
> function.
> 
> This change does not change any functionality. It makes the code
> a bit simpler.
> 
> Signed-off-by: Uladzislau Rezki (Sony) <urezki@...il.com>

Acked-by: Michal Hocko <mhocko@...e.com>

> ---
>  kernel/fork.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/kernel/fork.c b/kernel/fork.c
> index 2fa2a3582925..72d9e7c7639e 100644
> --- a/kernel/fork.c
> +++ b/kernel/fork.c
> @@ -311,11 +311,9 @@ static int alloc_thread_stack_node(struct task_struct *tsk, int node)
>  	 * so memcg accounting is performed manually on assigning/releasing
>  	 * stacks to tasks. Drop __GFP_ACCOUNT.
>  	 */
> -	stack = __vmalloc_node_range(THREAD_SIZE, THREAD_ALIGN,
> -				     VMALLOC_START, VMALLOC_END,
> +	stack = __vmalloc_node(THREAD_SIZE, THREAD_ALIGN,
>  				     THREADINFO_GFP & ~__GFP_ACCOUNT,
> -				     PAGE_KERNEL,
> -				     0, node, __builtin_return_address(0));
> +				     node, __builtin_return_address(0));
>  	if (!stack)
>  		return -ENOMEM;
>  
> -- 
> 2.39.5
> 

-- 
Michal Hocko
SUSE Labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ