Skip to content

vm_fault: expand KASSERT message in vm_fault_populate_cleanup#2038

Closed
isoux wants to merge 1 commit intofreebsd:mainfrom
isoux:improve-kassert-vm
Closed

vm_fault: expand KASSERT message in vm_fault_populate_cleanup#2038
isoux wants to merge 1 commit intofreebsd:mainfrom
isoux:improve-kassert-vm

Conversation

@isoux
Copy link
Contributor

@isoux isoux commented Feb 20, 2026

Include index values and object pointer in the diagnostic to improve debugging of pindex mismatches.

No functional change.

Comment on lines +514 to +518
__func__,
(uintmax_t)pages.index,
(uintmax_t)last,
(uintmax_t)first,
object));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style(9): Please avoid putting each argument on its own line. Instead, try to wrap the entire statement to a line width of 80 characters.

Suggested change
__func__,
(uintmax_t)pages.index,
(uintmax_t)last,
(uintmax_t)first,
object));
__func__, (uintmax_t)pages.index, (uintmax_t)last,
(uintmax_t)first, object));

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, adjusted formatting to follow style(9).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, updated the message formatting as suggested by kostikbel.

@spmzt spmzt requested a review from kostikbel March 15, 2026 20:07
@spmzt spmzt added the needs-review Someone should look at this before proceeding label Mar 15, 2026
@isoux isoux force-pushed the improve-kassert-vm branch from c78c1ea to e919172 Compare March 16, 2026 11:17
Copy link
Member

@kostikbel kostikbel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am fine with this.

My suggestion would be to put the message like "Object %p first %#jx last %#jx index %#jx" instead. We do not use '=', and put the object pointer first. But all of this is cosmetics.

Include index values and object pointer in the diagnostic
to improve debugging of pindex mismatches.

No functional change.

Signed-off-by: Isa Isoux <isa@isoux.org>
@isoux isoux force-pushed the improve-kassert-vm branch from e919172 to 86aa78c Compare March 16, 2026 13:01
Copy link
Member

@spmzt spmzt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@spmzt spmzt removed the needs-review Someone should look at this before proceeding label Mar 16, 2026
@spmzt spmzt self-assigned this Mar 16, 2026
@spmzt spmzt added staged Devevloper has this staged and will push or reject pending testing. merged Closed commit that's been merged and removed staged Devevloper has this staged and will push or reject pending testing. labels Mar 16, 2026
@spmzt
Copy link
Member

spmzt commented Mar 16, 2026

Automated message from ghpr: Thank you for your submission. This PR has been merged to FreeBSD's main branch. These changes will appear shortly on our GitHub mirror.

@spmzt spmzt closed this Mar 16, 2026
freebsd-git pushed a commit that referenced this pull request Mar 16, 2026
Include index values and object pointer in the diagnostic
to improve debugging of pindex mismatches.

No functional change.

Signed-off-by: Isa Isoux <isa@isoux.org>
Reviewed by: kib, pouria
Pull Request: #2038
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged Closed commit that's been merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants