Page MenuHomeFreeBSD

libpmc: pmc_init() should avoid overflowing pmc_class_table
ClosedPublic

Authored by tsoome on Aug 31 2022, 11:14 AM.
Tags
None
Referenced Files
F126548760: D36401.diff
Wed, Aug 20, 9:04 PM
F126547763: D36401.diff
Wed, Aug 20, 8:47 PM
Unknown Object (File)
Tue, Aug 19, 10:59 PM
Unknown Object (File)
Tue, Aug 19, 3:31 PM
Unknown Object (File)
Tue, Aug 19, 9:11 AM
Unknown Object (File)
Sun, Aug 17, 5:47 AM
Unknown Object (File)
Fri, Aug 15, 6:25 PM
Unknown Object (File)
Mon, Jul 28, 11:34 AM
Subscribers

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 47199
Build 44086: arc lint + arc unit

Event Timeline

50 enumeration values not handled in switch

jrtc27 added inline comments.
lib/libpmc/libpmc.c
1476

Presumably this was a hacky alternative way to write that pm_classes contained a PMC_CLASS_TSC? I imagine this check is now redundant.

1606

Should we have an equivalent of this for the classes case? Also for the ARMV7/8 switches we now have? I guess continuing with the subset libpmc has been taught about is helpful, but silently not getting a set of counters also isn't...

tsoome marked an inline comment as done.

review feedback.

tsoome added inline comments.
lib/libpmc/libpmc.c
1476

I have no idea about the history there, but yea, if the kernel does know about PMC_CLASS_TSC, it makes little sense to filter it out.

1606

Yes, good point.

This revision was not accepted when it landed; it landed in state Needs Review.Sep 5 2022, 12:39 PM
This revision was automatically updated to reflect the committed changes.
tsoome marked an inline comment as done.