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)
Thu, May 30, 9:36 AM
Unknown Object (File)
May 8 2024, 11:31 AM
Unknown Object (File)
May 8 2024, 11:31 AM
Unknown Object (File)
May 8 2024, 11:31 AM
Unknown Object (File)
May 8 2024, 11:31 AM
Unknown Object (File)
May 8 2024, 9:26 AM
Unknown Object (File)
Apr 20 2024, 5:04 AM
Unknown Object (File)
Apr 20 2024, 5:04 AM

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 Not Applicable
Unit
Tests Not Applicable

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.