git: 213f60737fa7 - stable/13 - linprocfs: Fixup vDSO name in the procmaps after 9931033bbf.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 17 Jun 2022 19:36:57 UTC
The branch stable/13 has been updated by dchagin:
URL: https://cgit.FreeBSD.org/src/commit/?id=213f60737fa72d2df5dd70003846d8eeec5640c0
commit 213f60737fa72d2df5dd70003846d8eeec5640c0
Author: Dmitry Chagin <dchagin@FreeBSD.org>
AuthorDate: 2021-07-20 07:04:20 +0000
Commit: Dmitry Chagin <dchagin@FreeBSD.org>
CommitDate: 2022-06-17 19:33:08 +0000
linprocfs: Fixup vDSO name in the procmaps after 9931033bbf.
As the sv_shared_page_base now pointed out to the native sharedpage and
the process VA layout has changed as follows:
VDSOPAGE (2 * PAGE_SIZE)
SHAREDPAGE (PAGE_SIZE)
USRSTACK
fixup the vDSO name by calculating the start of page relative to the
native sharedpage.
Differential revision: https://reviews.freebsd.org/D30903
MFC after: 2 weeks
(cherry picked from commit fe7409530c5420c739aee72b3dfd036c05628a2c)
---
sys/compat/linprocfs/linprocfs.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/sys/compat/linprocfs/linprocfs.c b/sys/compat/linprocfs/linprocfs.c
index 27acd7d651a7..42e1b5e075d3 100644
--- a/sys/compat/linprocfs/linprocfs.c
+++ b/sys/compat/linprocfs/linprocfs.c
@@ -1342,7 +1342,13 @@ linprocfs_doprocmaps(PFS_FILL_ARGS)
ino = vat.va_fileid;
vput(vp);
} else if (SV_PROC_ABI(p) == SV_ABI_LINUX) {
- if (e_start == p->p_sysent->sv_shared_page_base)
+ /*
+ * sv_shared_page_base pointed out to the
+ * FreeBSD sharedpage, PAGE_SIZE is a size
+ * of it. The vDSO page is above.
+ */
+ if (e_start == p->p_sysent->sv_shared_page_base +
+ PAGE_SIZE)
name = vdso_str;
if (e_end == p->p_sysent->sv_usrstack)
name = stack_str;