git: fe7409530c54 - main - linprocfs: Fixup vDSO name in the procmaps after 9931033bbf.
Dmitry Chagin
dchagin at FreeBSD.org
Tue Jul 20 07:10:32 UTC 2021
The branch main has been updated by dchagin:
URL: https://cgit.FreeBSD.org/src/commit/?id=fe7409530c5420c739aee72b3dfd036c05628a2c
commit fe7409530c5420c739aee72b3dfd036c05628a2c
Author: Dmitry Chagin <dchagin at FreeBSD.org>
AuthorDate: 2021-07-20 07:04:20 +0000
Commit: Dmitry Chagin <dchagin at FreeBSD.org>
CommitDate: 2021-07-20 07:04:20 +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
---
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 fc2c29240893..ae5823d96fdf 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;
More information about the dev-commits-src-all
mailing list