Commit d63ed7a4 authored by Alexander Kartashov's avatar Alexander Kartashov Committed by Pavel Emelyanov

x86: fixed the value of the macro TASK_SIZE to match the kernel one

This makes it possible to use TASK_SIZE instead of TASK_SIZE_MAX.
Signed-off-by: 's avatarAlexander Kartashov <alekskartashov@parallels.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 95bcaed4
...@@ -247,7 +247,7 @@ typedef struct { ...@@ -247,7 +247,7 @@ typedef struct {
# define MADV_DONTDUMP 16 # define MADV_DONTDUMP 16
#endif #endif
#define TASK_SIZE ((1UL << 47) - 1) #define TASK_SIZE ((1UL << 47) - PAGE_SIZE)
typedef uint64_t auxv_t; typedef uint64_t auxv_t;
......
...@@ -1262,7 +1262,6 @@ int cr_restore_tasks(pid_t pid, struct cr_options *opts) ...@@ -1262,7 +1262,6 @@ int cr_restore_tasks(pid_t pid, struct cr_options *opts)
return restore_root_task(root_item, opts); return restore_root_task(root_item, opts);
} }
#define TASK_SIZE_MAX ((1UL << 47) - PAGE_SIZE)
static long restorer_get_vma_hint(pid_t pid, struct list_head *tgt_vma_list, static long restorer_get_vma_hint(pid_t pid, struct list_head *tgt_vma_list,
struct list_head *self_vma_list, long vma_len) struct list_head *self_vma_list, long vma_len)
{ {
...@@ -1270,7 +1269,7 @@ static long restorer_get_vma_hint(pid_t pid, struct list_head *tgt_vma_list, ...@@ -1270,7 +1269,7 @@ static long restorer_get_vma_hint(pid_t pid, struct list_head *tgt_vma_list,
long prev_vma_end = 0; long prev_vma_end = 0;
struct vma_area end_vma; struct vma_area end_vma;
end_vma.vma.start = end_vma.vma.end = TASK_SIZE_MAX; end_vma.vma.start = end_vma.vma.end = TASK_SIZE;
prev_vma_end = PAGE_SIZE * 0x10; /* CONFIG_LSM_MMAP_MIN_ADDR=65536 */ prev_vma_end = PAGE_SIZE * 0x10; /* CONFIG_LSM_MMAP_MIN_ADDR=65536 */
s_vma = list_first_entry(self_vma_list, struct vma_area, list); s_vma = list_first_entry(self_vma_list, struct vma_area, list);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment