2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-30 13:58:34 +00:00

vdso: Add vdso_put_mark helper

Instead of opencoded mark injection provide
a helper for easier grepability.

[xemul: Go ahead and remove the INIT_VDSO_MARK at all]

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Cyrill Gorcunov
2013-05-24 16:39:41 +04:00
committed by Pavel Emelyanov
parent d2b415ca70
commit e7c64ae13c
2 changed files with 9 additions and 14 deletions

View File

@@ -246,7 +246,6 @@ int vdso_proxify(char *who, struct vdso_symtable *sym_rt, VmaEntry *vma, unsigne
struct vdso_symtable s = VDSO_SYMTABLE_INIT;
size_t size = vma_entry_len(vma);
bool remap_rt = true;
struct vdso_mark *m;
/*
* Find symbols in dumpee vdso.
@@ -301,9 +300,6 @@ int vdso_proxify(char *who, struct vdso_symtable *sym_rt, VmaEntry *vma, unsigne
* routine we could detect this vdso and do not dump it, since
* it's auto-generated every new session if proxy required.
*/
m = (void *)vdso_rt_parked_at;
INIT_VDSO_MARK(m);
m->proxy_addr = vma->start;
vdso_put_mark((void *)vdso_rt_parked_at, vma->start);
return 0;
}

View File

@@ -90,15 +90,6 @@ struct vdso_mark {
/* Magic number (criuvdso) */
#define VDSO_MARK_SIGNATURE (0x6f73647675697263ULL)
#define VDSO_MARK_INIT \
{ \
.signature = VDSO_MARK_SIGNATURE, \
.proxy_addr = VDSO_BAD_ADDR, \
}
#define INIT_VDSO_MARK(m) \
*(m) = (struct vdso_mark)VDSO_MARK_INIT
static inline bool is_vdso_mark(void *addr)
{
struct vdso_mark *m = addr;
@@ -107,6 +98,14 @@ static inline bool is_vdso_mark(void *addr)
m->proxy_addr != VDSO_BAD_ADDR;
}
static inline void vdso_put_mark(void *where, unsigned long proxy_addr)
{
struct vdso_mark *m = where;
m->signature = VDSO_MARK_SIGNATURE;
m->proxy_addr = proxy_addr;
}
extern struct vdso_symtable vdso_sym_rt;
extern u64 vdso_pfn;
extern int vdso_init(void);