Date: Tue, 20 Jul 2021 07:10:30 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: fe7409530c54 - main - linprocfs: Fixup vDSO name in the procmaps after 9931033bbf. Message-ID: <202107200710.16K7AUud030382@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=fe7409530c5420c739aee72b3dfd036c05628a2c commit fe7409530c5420c739aee72b3dfd036c05628a2c Author: Dmitry Chagin <dchagin@FreeBSD.org> AuthorDate: 2021-07-20 07:04:20 +0000 Commit: Dmitry Chagin <dchagin@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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202107200710.16K7AUud030382>