Page MenuHomeFreeBSD

intrng: add intrcnt/intrnames limit checking
AbandonedPublic

Authored by ehem_freebsd_m5p.com on Jan 31 2023, 10:11 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Oct 21, 12:44 PM
Unknown Object (File)
Sun, Oct 20, 11:55 PM
Unknown Object (File)
Oct 7 2024, 9:30 AM
Unknown Object (File)
Oct 2 2024, 4:36 PM
Unknown Object (File)
Sep 28 2024, 7:22 PM
Unknown Object (File)
Sep 18 2024, 2:37 PM
Unknown Object (File)
Sep 5 2024, 6:15 AM
Unknown Object (File)
Aug 14 2024, 8:32 PM

Details

Reviewers
markj
mmel
Summary

The intrcnt and intrnames tables ars a limited resource, best not to
overflow without a panic. Keep track of the limit and check during
allocations.

Diff Detail

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

Event Timeline

Hmm, reordering this means it needs this one extra bit (later on this should disappear).

Fixing copy/paste error for the panic messages.

Then on review realize the test needs to be this instead.

ehem_freebsd_m5p.com retitled this revision from intrng: add intrcnt limit checking to intrng: add intrcnt/intrnames limit checking.Feb 8 2023, 12:34 AM
ehem_freebsd_m5p.com edited the summary of this revision. (Show Details)

The name/description was hinting at the state of my tree when I noticed the issue. I suspect this will go in in a different state, update to reflect the situation better.

I'm including this as a parent of D36610 since it results in a very handy cut-off point where the old interrupt counters can be disabled with a tiny change, before removing all of the source.

freebsd_igalic.co added inline comments.
sys/kern/subr_intr.c
5

I'm glad we're using compilers these days that won't 💩 themselves on encountering Unicode in source

The patch looks ok to me otherwise.

sys/kern/subr_intr.c
5

In general we add copyrights for commits that make substantial changes to a file. I think a general rule is something like >10% of lines changed, though I can't find that anywhere in our documentation in the moment. I don't think this qualifies.

ehem_freebsd_m5p.com added inline comments.
sys/kern/subr_intr.c
5

Notice just above the start of the diff, the block which lists the files? To the right of the "Files" tab is the "Stack" tab. I've got a batch of commits/patches here, perhaps they don't individually hit the threshold, but as a group they should match appropriate thresholds for "kern_intr.c" and "subr_intr.c" (possibly also "intr_machdep.c" for PPC/x86).

My belief is whichever gets in first should add the Copyright line with the appropriate date.

Huh, Phabricator only accepted one comment being marked as done?

This is also funky due to D38437 changing enough lines to make this troublesome.

Huh, Phabricator only accepted one comment being marked as done?

This is also funky due to D38437 changing enough lines to make this troublesome.

It looks like D38437 effectively supersedes this patch?

sys/kern/subr_intr.c
5

Then the addition of a copyright line should be done in a standalone diff.

I would disagree about D38437 superseding this, but it does offer some equivalent functionality. As a result, this is indeed no longer appropriate.