1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-05 12:56:08 +00:00

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
This commit is contained in:
Dmitry Chagin 2021-07-20 10:04:20 +03:00
parent 09cffde975
commit fe7409530c

View File

@ -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;