Commit graph

4 commits

Author SHA1 Message Date
Ed Maste
724e383bd4 munmap.2: Add STANDARDS and note about portability
POSIX used to specify that munmap shall fail with EINVAL if the addr
argument is not a multiple of the page size, but that was changed to
may fail.  Note that we conform to contemporary POSIX and include a
brief note for portable programs.

Reviewed by:	brooks
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D48481
2025-01-16 12:50:47 -05:00
Ed Maste
fab411c4fd munmap.2: Remove EINVAL for negative len
len is unsigned (it is size_t), so cannot be negative.

Sponsored by:	The FreeBSD Foundation
2025-01-15 16:49:21 -05:00
Ed Maste
9e36aaf0c2 munmap.2: Unaligned addresses do not return error
We previously claimed that non-page-aligned addresses would return
EINVAL, but the address is in fact rounded down to the page boundary.

Reported by:	Harald Eilertsen <haraldei@anduin.net>
Reviewed by:	brooks
Sponsored by:	The FreeBSD Foundation
Fixes: dabee6fecc ("kern_descrip.c: add fdshare()/fdcopy()")
Differential Revision: https://reviews.freebsd.org/D48465
2025-01-15 13:09:37 -05:00
Brooks Davis
8269e7673c libsys: relocate implementations and manpages
Remove core system call implementations and documentation to lib/libsys
and lib/libsys/<arch> from lib/libc/sys and lib/libc/<arch>/<sys>.
Update paths to allow libc to find them in their new home.

Reviewed by:	kib, emaste, imp
Pull Request:	https://github.com/freebsd/freebsd-src/pull/908
2024-02-05 20:34:55 +00:00
Renamed from lib/libc/sys/munmap.2 (Browse further)