Files

26 lines
641 B
C
Raw Permalink Normal View History

/* SPDX-License-Identifier: GPL-2.0 */
2018-01-08 15:38:10 +00:00
// Copyright (C) 2017 Arm Ltd.
#ifndef __ASM_VMAP_STACK_H
#define __ASM_VMAP_STACK_H
#include <linux/gfp.h>
#include <linux/vmalloc.h>
2020-06-08 21:32:38 -07:00
#include <linux/pgtable.h>
#include <asm/memory.h>
2018-01-08 15:38:10 +00:00
#include <asm/thread_info.h>
/*
* To ensure that VMAP'd stack overflow detection works correctly, all VMAP'd
* stacks need to have the same alignment.
*/
static inline unsigned long *arch_alloc_vmap_stack(size_t stack_size, int node)
{
void *p;
p = __vmalloc_node(stack_size, THREAD_ALIGN, THREADINFO_GFP, node,
__builtin_return_address(0));
return kasan_reset_tag(p);
2018-01-08 15:38:10 +00:00
}
#endif /* __ASM_VMAP_STACK_H */