Page MenuHomeFreeBSD

LinuxKPI: Add ida_alloc_min()
ClosedPublic

Authored by wulf on Nov 28 2023, 9:05 PM.
Tags
None
Referenced Files
Unknown Object (File)
Oct 5 2024, 8:24 AM
Unknown Object (File)
Oct 4 2024, 11:25 PM
Unknown Object (File)
Oct 4 2024, 3:52 AM
Unknown Object (File)
Oct 3 2024, 3:57 PM
Unknown Object (File)
Oct 3 2024, 1:09 PM
Unknown Object (File)
Oct 3 2024, 8:16 AM
Unknown Object (File)
Oct 3 2024, 7:26 AM
Unknown Object (File)
Sep 28 2024, 1:18 PM

Details

Summary

ida_alloc_min() allocates an unused ID. between min and INT_MAX.

Sponsored by: Serenity Cyber Security, LLC
MFC after: 1 week

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

wulf requested review of this revision.Nov 28 2023, 9:05 PM
This revision is now accepted and ready to land.Nov 29 2023, 6:12 AM
bz requested changes to this revision.Dec 8 2023, 5:28 PM
bz added inline comments.
sys/compat/linuxkpi/common/include/linux/idr.h
138

INT_MAX or UINT_MAX given min is unsigned or should that be just int?

This revision now requires changes to proceed.Dec 8 2023, 5:28 PM
wulf marked an inline comment as done.Dec 9 2023, 12:06 PM
wulf added inline comments.
sys/compat/linuxkpi/common/include/linux/idr.h
138

I set INT_MAX due to misleading comment in Linux header. Actual code uses ~0u AKA UINT_MAX

wulf marked an inline comment as done.

allow end parameter of ida_simple_get() be larger than INT_MAX. Linux caps the value to INT_MAX.

This revision is now accepted and ready to land.Dec 12 2023, 1:38 AM
This revision was automatically updated to reflect the committed changes.