Some SEGVGUARD messages are debugging-only. Only output them in verbose

mode.
This commit is contained in:
Shawn Webb 2016-12-21 21:14:49 -05:00
parent 5abb3d76c5
commit 657ec202e7
No known key found for this signature in database
GPG key ID: 411DCD7D5C3BFCB6

View file

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