mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-01-23 10:16:41 +00:00
There were multiple copy of the same code spread over the different architectures handling the vDSO. This patch is merging the duplicated code in arch/*/vdso-pie.c and arch/*/include/asm/vdso.h in the common files and let only the architecture specific part in the arch/*/* files. The file are now organized this way: include/asm-generic/vdso.h contains basic definition which could be overwritten by architectures. arch/*/include/asm/vdso.h contains per architecture definitions. It may includes include/asm-generic/vdso.h pie/util-vdso.c include/util-vdso.h These files contains code and definitions common to both criu and the parasite code. The file include/util-vdso.h includes arch/*/include/asm/vdso.h. pie/parsite-vdso.c include/parasite-vdso.h contains code and definition specific to the parasite code handling the vDSO. The file include/parasite-vdso.h includes include/util-vdso.h. arch/*/vdso-pie.c contains the architecture specific code installing the vDSO trampoline. vdso.c include/vdso.h contains code and definition specific to the criu code handling the vDSO. The file include/vdso.h includes include/util-vdso.h. CC: Christopher Covington <cov@codeaurora.org> CC: Pavel Emelyanov <xemul@parallels.com> Signed-off-by: Laurent Dufour <ldufour@linux.vnet.ibm.com> Acked-by: Cyrill Gorcunov <gorcunov@gmail.com> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
27 lines
507 B
C
27 lines
507 B
C
#ifndef __CR_VDSO_H__
|
|
#define __CR_VDSO_H__
|
|
|
|
#include <sys/mman.h>
|
|
#include <stdbool.h>
|
|
|
|
#include "config.h"
|
|
|
|
#ifdef CONFIG_VDSO
|
|
|
|
#include "util-vdso.h"
|
|
|
|
extern struct vdso_symtable vdso_sym_rt;
|
|
|
|
extern int vdso_init(void);
|
|
|
|
extern int parasite_fixup_vdso(struct parasite_ctl *ctl, pid_t pid,
|
|
struct vm_area_list *vma_area_list);
|
|
|
|
#else /* CONFIG_VDSO */
|
|
|
|
#define vdso_init() (0)
|
|
#define parasite_fixup_vdso(ctl, pid, vma_area_list) (0)
|
|
|
|
#endif /* CONFIG_VDSO */
|
|
|
|
#endif /* __CR_VDSO_H__ */
|