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)
Sat, Oct 4, 7:32 AM
Unknown Object (File)
Sat, Sep 20, 6:08 AM
Unknown Object (File)
Sat, Sep 20, 5:20 AM
Unknown Object (File)
Thu, Sep 18, 3:07 AM
Unknown Object (File)
Wed, Sep 17, 8:15 AM
Unknown Object (File)
Sep 13 2025, 11:18 PM
Unknown Object (File)
Aug 26 2025, 11:31 PM
Unknown Object (File)
Aug 26 2025, 11:22 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.