Page MenuHomeFreeBSD

linuxkpi: Clean up linux_shmem_file_setup() a bit
ClosedPublic

Authored by markj on Jan 12 2026, 6:56 PM.
Tags
None
Referenced Files
F145390294: D54673.id169535.diff
Thu, Feb 19, 5:26 AM
Unknown Object (File)
Wed, Feb 18, 7:46 AM
Unknown Object (File)
Tue, Feb 17, 1:58 AM
Unknown Object (File)
Sun, Feb 8, 7:23 AM
Unknown Object (File)
Sat, Feb 7, 5:18 PM
Unknown Object (File)
Sun, Feb 1, 3:25 AM
Unknown Object (File)
Sat, Jan 31, 6:22 AM
Unknown Object (File)
Wed, Jan 28, 1:30 AM
Subscribers

Details

Summary
  • Free the pointer that was returned by the allocator, instead of the address of the first member. These will be equal in practice, but it's sketchy and possibly won't work on CHERI.
  • Use an anonymous struct, there's no need to name it.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 69831
Build 66714: arc lint + arc unit

Event Timeline

markj requested review of this revision.Jan 12 2026, 6:56 PM
This revision is now accepted and ready to land.Jan 14 2026, 4:26 PM
brooks added a subscriber: brooks.

In practice, this would be fine with default CHERI C, but broken with subobject bounds.