linux(4): Make vDSO defines private.

Hide the vDSO defines to the linux32_sysvec as they are not intended to
be used outside of it. Fix LINUX32_PS_STRINGS, use the size of
struct linux32_ps_strings instead of a numeric constant.

MFC after:	2 weeks
This commit is contained in:
Dmitry Chagin 2021-06-25 18:41:04 +03:00
parent a11ca79cd9
commit 4aae133469
2 changed files with 6 additions and 6 deletions

View file

@ -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 */

View file

@ -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);