x86/criu: shstk restorer memory accounting functions

* shstk_restorer_stack_size(): PAGE_SIZE
* shstk_set_restorer_stack(): set restorer temporary shadow stack start

Signed-off-by: Igor Svilenkov Bozic <svilenkov@gmail.com>
Co-Authored-By: Andrei Vagin <avagin@gmail.com>
Signed-off-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>
This commit is contained in:
Igor Svilenkov Bozic 2025-09-04 21:45:19 +02:00 committed by Andrei Vagin
parent 3365c7c025
commit f29cb750db

View file

@ -73,6 +73,17 @@ int arch_shstk_trampoline(struct pstree_item *item, CoreEntry *core,
int (*func)(void *arg), void *arg);
#define arch_shstk_trampoline arch_shstk_trampoline
static always_inline long shstk_restorer_stack_size(void)
{
return PAGE_SIZE;
}
#define shstk_restorer_stack_size shstk_restorer_stack_size
static always_inline void shstk_set_restorer_stack(struct rst_shstk_info *info, void *ptr)
{
info->tmp_shstk = (unsigned long)ptr;
}
#define shstk_set_restorer_stack shstk_set_restorer_stack
#ifdef CR_NOGLIBC
#include <compel/plugins/std/syscall.h>