From 657ec202e7a010fae5bb56cd8672ab1b403bb8eb Mon Sep 17 00:00:00 2001 From: Shawn Webb Date: Wed, 21 Dec 2016 21:14:49 -0500 Subject: [PATCH] Some SEGVGUARD messages are debugging-only. Only output them in verbose mode. --- sys/hardenedbsd/hbsd_pax_segvguard.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/sys/hardenedbsd/hbsd_pax_segvguard.c b/sys/hardenedbsd/hbsd_pax_segvguard.c index 5946a239028..235bb8c7174 100644 --- a/sys/hardenedbsd/hbsd_pax_segvguard.c +++ b/sys/hardenedbsd/hbsd_pax_segvguard.c @@ -354,8 +354,10 @@ pax_segvguard_add(struct thread *td, struct vnode *vn, sbintime_t sbt) error = VOP_GETATTR(vn, &vap, td->td_ucred); if (error != 0) { - pax_log_segvguard(td->td_proc, PAX_LOG_DEFAULT, - "%s:%d stat error. Bailing.", __func__, __LINE__); + if (bootverbose) + pax_log_segvguard(td->td_proc, PAX_LOG_DEFAULT, + "%s:%d stat error. Bailing.", __func__, + __LINE__); return (NULL); } @@ -394,8 +396,10 @@ pax_segvguard_lookup(struct thread *td, struct vnode *vn) error = VOP_GETATTR(vn, &vap, td->td_ucred); if (error != 0) { - pax_log_segvguard(td->td_proc, PAX_LOG_DEFAULT, - "%s:%d stat error. Bailing.", __func__, __LINE__); + if (bootverbose) + pax_log_segvguard(td->td_proc, PAX_LOG_DEFAULT, + "%s:%d stat error. Bailing.", __func__, + __LINE__); return (NULL); }