Page MenuHomeFreeBSD

vm/vm_mmap.c: provide extended errors for most places
ClosedPublic

Authored by kib on Jun 11 2025, 8:39 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Apr 3, 5:02 PM
Unknown Object (File)
Sun, Mar 22, 4:53 AM
Unknown Object (File)
Sun, Mar 22, 4:52 AM
Unknown Object (File)
Sat, Mar 21, 6:38 PM
Unknown Object (File)
Mar 2 2026, 7:31 PM
Unknown Object (File)
Feb 27 2026, 2:00 PM
Unknown Object (File)
Feb 8 2026, 2:17 PM
Unknown Object (File)
Feb 7 2026, 11:20 PM
Subscribers

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kib requested review of this revision.Jun 11 2025, 8:39 AM
brooks added inline comments.
sys/vm/vm_mmap.c
1704

Is the intent here that this is a backup message if the caller doesn't provide a more specific one?

I might use "mach vm error" for the message.

This revision is now accepted and ready to land.Jun 12 2025, 8:25 PM
sys/vm/vm_mmap.c
1704

Mach errors are not in errno namespace, so I do not think it is appropriate to use SET_ERROR() in the vm_map.c or vm_object.c code, which is called into by vm_mmap.c to do the actual work.

Generally SET_ERROR() should be only used in the place where the error is detected, but for Mach code it is not right.