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, Jun 26, 4:26 PM
Unknown Object (File)
Wed, Jun 19, 5:47 PM
Unknown Object (File)
May 15 2024, 10:31 PM
Unknown Object (File)
May 12 2024, 4:32 PM
Unknown Object (File)
May 12 2024, 4:32 PM
Unknown Object (File)
May 8 2024, 5:16 PM
Unknown Object (File)
May 8 2024, 5:16 PM
Unknown Object (File)
May 8 2024, 1:22 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.