diff --git a/sys/amd64/linux32/linux.h b/sys/amd64/linux32/linux.h index a9554561964..8d7a36eedee 100644 --- a/sys/amd64/linux32/linux.h +++ b/sys/amd64/linux32/linux.h @@ -44,12 +44,6 @@ #define LINUX_DTRACE linuxulator32 -#define LINUX32_MAXUSER ((1ul << 32) - PAGE_SIZE) -#define LINUX32_SHAREDPAGE (LINUX32_MAXUSER - PAGE_SIZE) -#define LINUX32_USRSTACK LINUX32_SHAREDPAGE - -/* XXX 16 = sizeof(linux32_ps_strings) */ -#define LINUX32_PS_STRINGS (LINUX32_USRSTACK - 16) #define LINUX32_MAXDSIZ (512 * 1024 * 1024) /* 512MB */ #define LINUX32_MAXSSIZ (64 * 1024 * 1024) /* 64MB */ #define LINUX32_MAXVMEM 0 /* Unlimited */ diff --git a/sys/amd64/linux32/linux32_sysvec.c b/sys/amd64/linux32/linux32_sysvec.c index d534d52392b..8e3e728161c 100644 --- a/sys/amd64/linux32/linux32_sysvec.c +++ b/sys/amd64/linux32/linux32_sysvec.c @@ -90,6 +90,10 @@ __FBSDID("$FreeBSD$"); MODULE_VERSION(linux, 1); +#define LINUX32_MAXUSER ((1ul << 32) - PAGE_SIZE) +#define LINUX32_SHAREDPAGE (LINUX32_MAXUSER - PAGE_SIZE) +#define LINUX32_USRSTACK LINUX32_SHAREDPAGE + static int linux_szsigcode; static vm_object_t linux_shared_page_obj; static char *linux_shared_page_mapping; @@ -158,6 +162,8 @@ struct linux32_ps_strings { u_int32_t ps_envstr; /* first of 0 or more environment strings */ u_int ps_nenvstr; /* the number of environment strings */ }; +#define LINUX32_PS_STRINGS (LINUX32_USRSTACK - \ + sizeof(struct linux32_ps_strings)) LINUX_VDSO_SYM_INTPTR(linux32_sigcode); LINUX_VDSO_SYM_INTPTR(linux32_rt_sigcode);