git: a13f21b252e8 - stable/13 - linux(4): Make vDSO defines private.

From: Dmitry Chagin <dchagin_at_FreeBSD.org>
Date: Fri, 17 Jun 2022 19:32:12 UTC
The branch stable/13 has been updated by dchagin:

URL: https://cgit.FreeBSD.org/src/commit/?id=a13f21b252e8f943968262f0397b88cd4c8f486d

commit a13f21b252e8f943968262f0397b88cd4c8f486d
Author:     Dmitry Chagin <dchagin@FreeBSD.org>
AuthorDate: 2021-06-25 15:41:04 +0000
Commit:     Dmitry Chagin <dchagin@FreeBSD.org>
CommitDate: 2022-06-17 19:30:24 +0000

    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
    
    (cherry picked from commit 4aae133469c6bc4ace55bc54eee552971e37e1c4)
---
 sys/amd64/linux32/linux.h          | 6 ------
 sys/amd64/linux32/linux32_sysvec.c | 6 ++++++
 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 2670f9ff7b83..13ba0c883c42 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);