diff options
author | Dmitry Chagin <dchagin@FreeBSD.org> | 2021-07-20 07:04:20 +0000 |
---|---|---|
committer | Dmitry Chagin <dchagin@FreeBSD.org> | 2022-06-17 19:33:08 +0000 |
commit | 213f60737fa72d2df5dd70003846d8eeec5640c0 (patch) | |
tree | d36ab47d091f6a294a7d4aab6989e6704bab149f /sys/compat/linprocfs/linprocfs.c | |
parent | 4e34c0445c4084a17444691f22146af4ba28bf52 (diff) |
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)
Diffstat (limited to 'sys/compat/linprocfs/linprocfs.c')
-rw-r--r-- | sys/compat/linprocfs/linprocfs.c | 8 |
1 files changed, 7 insertions, 1 deletions
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; |