From owner-dev-commits-src-all@freebsd.org Tue Jul 20 07:10:31 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D569866645C; Tue, 20 Jul 2021 07:10:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GTVGv2TzVz3tC8; Tue, 20 Jul 2021 07:10:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DC7DF26389; Tue, 20 Jul 2021 07:10:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 16K7AUmA030383; Tue, 20 Jul 2021 07:10:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 16K7AUud030382; Tue, 20 Jul 2021 07:10:30 GMT (envelope-from git) Date: Tue, 20 Jul 2021 07:10:30 GMT Message-Id: <202107200710.16K7AUud030382@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Chagin Subject: git: fe7409530c54 - main - linprocfs: Fixup vDSO name in the procmaps after 9931033bbf. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fe7409530c5420c739aee72b3dfd036c05628a2c Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jul 2021 07:10:32 -0000 The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=fe7409530c5420c739aee72b3dfd036c05628a2c commit fe7409530c5420c739aee72b3dfd036c05628a2c Author: Dmitry Chagin AuthorDate: 2021-07-20 07:04:20 +0000 Commit: Dmitry Chagin 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;