[CRIU] [PATCH 4/5] vdso: parasite -- Prepare new vdso mark structure.
Pavel Emelyanov
xemul at parallels.com
Tue Jun 10 08:42:57 PDT 2014
On 06/06/2014 06:07 PM, Cyrill Gorcunov wrote:
> @@ -78,26 +84,38 @@ static inline unsigned long vdso_vma_size(struct vdso_symtable *t)
> */
> struct vdso_mark {
> u64 signature;
> - unsigned long proxy_addr;
> -};
> + unsigned long proxy_vdso_addr;
> +
> + unsigned long version;
This is write-only variable.
>
> + /*
> + * In case of new vDSO format the VVAR area address
> + * neeed for easier discovering where it lives without
> + * relying on procfs output.
> + */
How do we distinguish 3 cases from each other:
1. Old kernel w/o vvar area
2. New kernel with vvar area
3. New kernel with vvar area and error in its detection
?
> + unsigned long proxy_vvar_addr;
> +};
> /* Magic number (criuvdso) */
> #define VDSO_MARK_SIGNATURE (0x6f73647675697263ULL)
This signature is no longer in use in the code. Why?
> +#define VDSO_MARK_SIGNATURE_V2 (0x4f53447675697263ULL) /* Magic number (criuvDSO) */
Can we make these comments to be placed in one manner?
>
> static inline bool is_vdso_mark(void *addr)
> {
> struct vdso_mark *m = addr;
>
> - return m->signature == VDSO_MARK_SIGNATURE &&
> - m->proxy_addr != VDSO_BAD_ADDR;
> + return (m->signature == VDSO_MARK_SIGNATURE_V2 ||
> + m->signature == VDSO_MARK_SIGNATURE) &&
> + m->proxy_vdso_addr != VDSO_BAD_ADDR;
> }
>
> -static inline void vdso_put_mark(void *where, unsigned long proxy_addr)
> +static inline void vdso_put_mark(void *where, unsigned long proxy_vdso_addr, unsigned long proxy_vvar_addr)
More information about the CRIU
mailing list