aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Chagin <dchagin@FreeBSD.org>2021-06-25 15:41:04 +0000
committerDmitry Chagin <dchagin@FreeBSD.org>2021-06-25 15:41:04 +0000
commit4aae133469c6bc4ace55bc54eee552971e37e1c4 (patch)
tree303076e3a5bf30c8330eef6f4b3db627fc63fea7
parenta11ca79cd9d00b102c7bf8a0b683fd85079a6346 (diff)
downloadsrc-4aae133469c6bc4ace55bc54eee552971e37e1c4.tar.gz
src-4aae133469c6bc4ace55bc54eee552971e37e1c4.zip
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
-rw-r--r--sys/amd64/linux32/linux.h6
-rw-r--r--sys/amd64/linux32/linux32_sysvec.c6
2 files changed, 6 insertions, 6 deletions
diff --git a/sys/amd64/linux32/linux.h b/sys/amd64/linux32/linux.h
index a95545619640..8d7a36eedee9 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 d534d52392b6..8e3e728161ce 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);