Page MenuHomeFreeBSD

kdump: use print_mask_arg0 appropriately
ClosedPublic

Authored by kevans on Dec 12 2023, 3:53 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Jul 2, 11:34 PM
Unknown Object (File)
Wed, Jun 25, 6:35 AM
Unknown Object (File)
Tue, Jun 17, 11:54 PM
Unknown Object (File)
Fri, Jun 13, 2:41 PM
Unknown Object (File)
Thu, Jun 12, 2:39 PM
Unknown Object (File)
Sun, Jun 8, 3:36 PM
Unknown Object (File)
Sat, Jun 7, 3:45 PM
Unknown Object (File)
Fri, Jun 6, 3:46 PM
Subscribers

Details

Summary
Some callers are using print_mask_arg() when they should be using
print_mask_arg0(); the latter should be used when all flags are optional
and there's not a flag to be decoded with a 0-mask.  This turns:

nmount(0x6991e009000,0x8,0<><invalid>0)

into:

nmount(0x6991e009000,0x8,0)

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Whoops, fix inconsistent blank line

usr.bin/kdump/kdump.c
243

This exists for those cases. Probably nmount() needs to use print_mask_arg0 instead? Some flags require at least one flag to be set, and that is why print_mask_arg has this behavior.

Use the correct print_mask_arg* variant; at least close_range(2) and all of the
*mount() syscalls are flag-optional and no 0-mask flag to be decoded.

kevans retitled this revision from kdump: avoid decoding if value == 0 to kdump: use print_mask_arg0 appropriately.Dec 12 2023, 8:32 PM
kevans edited the summary of this revision. (Show Details)

Pointy hat to me for the *mount() ones.

This revision is now accepted and ready to land.Dec 12 2023, 10:37 PM
This revision was automatically updated to reflect the committed changes.