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); }