git: d2de68811a80 - main - Fix assert check for SV_DSO_SIG in exec_sysvec_init_secondary()

From: Justin Hibbits <jhibbits_at_FreeBSD.org>
Date: Thu, 09 Dec 2021 04:55:17 UTC
The branch main has been updated by jhibbits:

URL: https://cgit.FreeBSD.org/src/commit/?id=d2de68811a80bffe20040592dca194238c5a5c86

commit d2de68811a80bffe20040592dca194238c5a5c86
Author:     Justin Hibbits <jhibbits@FreeBSD.org>
AuthorDate: 2021-12-09 04:50:10 +0000
Commit:     Justin Hibbits <jhibbits@FreeBSD.org>
CommitDate: 2021-12-09 04:54:07 +0000

    Fix assert check for SV_DSO_SIG in exec_sysvec_init_secondary()
    
    The only requirement for SV_DSO_SIG here is that the flags match between
    the source and target sysentvec.
    
    The current assertion is too strict and fails on powerpc64, the only
    other architecture than amd64 that uses this function, which doesn't
    implement sigtramp in a VDSO.
    
    Reviewed by:    kib
    Differential Revision:  https://reviews.freebsd.org/D33355
---
 sys/kern/kern_sharedpage.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/sys/kern/kern_sharedpage.c b/sys/kern/kern_sharedpage.c
index 9b36676decd5..3aa5501eafdc 100644
--- a/sys/kern/kern_sharedpage.c
+++ b/sys/kern/kern_sharedpage.c
@@ -387,8 +387,7 @@ exec_sysvec_init_secondary(struct sysentvec *sv, struct sysentvec *sv2)
 	MPASS((sv2->sv_flags & SV_ABI_MASK) == (sv->sv_flags & SV_ABI_MASK));
 	MPASS((sv2->sv_flags & SV_TIMEKEEP) == (sv->sv_flags & SV_TIMEKEEP));
 	MPASS((sv2->sv_flags & SV_SHP) != 0 && (sv->sv_flags & SV_SHP) != 0);
-	MPASS((sv2->sv_flags & SV_DSO_SIG) != 0 &&
-	    (sv->sv_flags & SV_DSO_SIG) != 0);
+	MPASS((sv2->sv_flags & SV_DSO_SIG) == (sv->sv_flags & SV_DSO_SIG));
 	MPASS((sv2->sv_flags & SV_RNG_SEED_VER) ==
 	    (sv->sv_flags & SV_RNG_SEED_VER));