Date: Fri, 25 Jun 2021 15:41:40 GMT From: Dmitry Chagin <dchagin@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 4aae133469c6 - main - linux(4): Make vDSO defines private. Message-ID: <202106251541.15PFfelQ046256@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=4aae133469c6bc4ace55bc54eee552971e37e1c4 commit 4aae133469c6bc4ace55bc54eee552971e37e1c4 Author: Dmitry Chagin <dchagin@FreeBSD.org> AuthorDate: 2021-06-25 15:41:04 +0000 Commit: Dmitry Chagin <dchagin@FreeBSD.org> CommitDate: 2021-06-25 15:41:04 +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 --- 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 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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202106251541.15PFfelQ046256>