Commit graph

2165 commits

Author SHA1 Message Date
Dag-Erling Smørgrav
fb18c369c3 access(2): Discourage use of these system calls.
Fixes:		421025a274fb
PR:		262895
MFC after:	3 days
Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D45240

(cherry picked from commit a4be1eb21165d7aedae9dc6634528619ff10d025)
(cherry picked from commit 79b39f23e1)

Approved by:	re (cperciva)
2024-05-23 04:45:55 +02:00
Gordon Bergling
8766ae10d3 access.2: Mention that lstat(2) should be used for symbolic links
access(), eaccess() and faccessat() will always dereference
symbolic links.

So add a note in the manual page, that lstat(2) should be
used in the case of symbolic links.

PR:	262895
Reviewed by:	gbe, pauamma_gundo.com
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D44890

(cherry picked from commit 421025a274fb5759b3ecc8bdb30b24db830b45ae)
(cherry picked from commit f075b61137)

Approved by:	re (cperciva)
2024-05-23 04:45:49 +02:00
Alexander Ziaee
839a522e2e intro.2 as errno.2: Update maximum hard link limit
MFC after:	1 week
Co-authored-by: brooks
Reviewed by:	brooks, emaste, imp
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1192

(cherry picked from commit 6dfbe695c3223822734dddc926415a3ba347b42c)
(cherry picked from commit 828e648b26)
Approved-by: re (cperciva)
2024-05-21 14:08:58 -06:00
Alexander Ziaee
e59ebcf36f intro.2: Add sys/syscall.h to SYNOPSIS
MFC after:	1 week
Co-authored-by: brooks
Reviewed by:	brooks, emaste, imp
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1192

(cherry picked from commit 69ff2d754c1c8bd9c2b6cea28aa754e9f92f9613)
(cherry picked from commit cbe2436dda)
Approved-by: re (cperciva)
2024-05-21 14:08:53 -06:00
Konstantin Belousov
afc8b17816 sigqueue(2): Document __SIGQUEUE_TID
(cherry picked from commit dcc180c51b9c13df3d1158d14d450308711fe93c)
2024-04-30 03:48:09 +03:00
Gordon Bergling
499d4a6094 timerfd.2: Remove a double word
- s/is is/is/

(cherry picked from commit bbef63ec27fdb86814e34c4b4013cd92ba86bc42)
2024-04-23 07:22:46 +02:00
Christopher Davidson
ac4ddd8b1f open.2: remove self-reference
Change .Xr reference to .Fn, which quiets a mandoc warning.

Reviewed by:	mhorne
MFC after:	3 days
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1135

(cherry picked from commit d3de1bd429bc51fbbcb37fadaf2581461edf848b)
2024-04-18 15:18:34 -03:00
Ed Maste
c3c75c142c open: make non-POSIX errno value more apparent
In the errno list, add an explicit note and reference to the note in the
STANDARDS section.

When O_NOFOLLOW is specified and the target is a symbolic link FreeBSD
sets errno to a value different than that specified by POSIX.  Commit
295159dfa3 added a note to this effect, but I missed it when reading
through the list of errno values.

PR:		214633
Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D43618

(cherry picked from commit ea6a6b63e1fd304e790c8ed7627caf5e3ba52bc7)
2024-03-22 09:30:30 -04:00
Andrew Turner
bce8a0ba15 libc: Teach libc about the BTI elf note
Add the Branch Target Identification (BTI) note to libc assembly
sources. As all obect files need the note for the library to have it
we need to insert it in all asm files.

Reviewed by:	emaste, markj
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D42228

(cherry picked from commit fd5aaf2ea0178b03aa93c35245053247e5d3840c)
2024-02-19 13:17:37 +00:00
Konstantin Belousov
8309579720 Document aio_read2/aio_write2
(cherry picked from commit a52cb4c480f270fc7158a0f58179f7b80d8a5b3c)
2024-02-18 12:01:46 +02:00
Konstantin Belousov
1298ecb6ba lio_listio(2): add LIO_FOFFSET flag to ignore aiocb aio_offset
(cherry picked from commit e4b7bbd6ab77e908a60362aa29e518f224a117b0)
2024-02-18 12:01:46 +02:00
Konstantin Belousov
16b1438c73 read.2: Describe debug.iosize_max_clamp
PR:	276937

(cherry picked from commit 3e9515846f8cbff0ecccaab65d9f70890d04429e)
2024-02-14 05:41:54 +02:00
Konstantin Belousov
14b7cf92e7 open(2): describe *at behavior for dirfd opened without O_SEARCH
(cherry picked from commit a570fe4d0dd979ce099374259ffc45d56ae4e471)
2024-02-01 02:30:40 +02:00
Mark Johnston
ea3197e69b kcmp: Add a manual page
Reviewed by:	kib, emaste
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D43562

(cherry picked from commit af0d437dd31f71726f7eb5e9aca9fbd374a8277a)
2024-01-31 09:16:29 -05:00
Konstantin Belousov
f8d885c08d Add kcmp(2) userspace bits
(cherry picked from commit 211bdd601ee51f90da9b123807ef68ac122116b9)
2024-01-30 22:24:42 +02:00
Gordon Bergling
c75648dc9b sigfastblock.2: Fix a typo in the manual page
- s/successfull/successful/

(cherry picked from commit a70008e95b907336bddbcc2aa9d567df6e3a41b6)
2024-01-23 07:43:27 +01:00
Gordon Bergling
9509e32f9e _umtx_op.2: Fix a typo in the manual page
- s/interpeted/interpreted/

(cherry picked from commit b2ec175fcaac90fc6a1caf066656eaa092f32611)
2024-01-23 07:40:33 +01:00
Alan Somers
5b4873c5b8 Remove _POSIX_PRIORITIZED_IO references from man pages
We don't support it, so there's no need to tell readers what would
happen if we did.  Also, don't remind the user that a certain field is
ignored by aio_read.  Mentioning every ignored field would make the man
pages too verbose.

Sponsored by:	Axcient
Reviewed by:	Pau Amma <pauamma@gundo.com>
Differential Revision: https://reviews.freebsd.org/D42622

(cherry picked from commit 18e2c4175f78f1aaa648dd7fb7530220aed23671)
2024-01-19 18:52:18 -07:00
Alan Somers
f9f7404cd5 sigaction.2: clarify that fork isn't async-signal-safe, but _Fork is
[skip ci]

Sponsored by:	Axcient
Reviewed by:	kib
Differential Revision: https://reviews.freebsd.org/D42865

(cherry picked from commit c2ed7a63604fc86244adee2966e19f8aba2a07cb)
2024-01-19 18:51:27 -07:00
Tom Hukins
554b8bc907 Fix "version introduced" in numerous manual pages
Pull request:	https://github.com/freebsd/freebsd-src/pull/853

(cherry picked from commit ba719a0fec8f831aef4b23de0ff36fd47bb26651)
2024-01-15 10:20:56 -05:00
Mark Johnston
8ac8b0b6aa setfib.2: Consistently capitalize "FIB"
MFC after:	1 week
Sponsored by:	Klara, Inc.

(cherry picked from commit ee7d5ba1b55441476643983d3f70df5ee9ea97c4)
2024-01-11 09:18:12 -05:00
Rick Macklem
5c4da68ad7 copy_file_range.2: Clarify that only regular files work
PR#273962 reported that copy_file_range(2) did not work
on shared memory objects and returned EINVAL.
Although the reporter felt this was incorrect, it is what
the Linux copy_file_range(2) syscall does.

Since there was no collective agreement that the FreeBSD
semantics should be changed to no longer be Linux compatible,
copy_file_range(2) still works on regular files only.

This man page update clarifies that. If, someday, copy_file_range(2)
is changed to support non-regular files, then the man page will
need to be updated to reflect that.

PR:	273962

(cherry picked from commit 84b4342c0d7ac8a3187309a978d41e6765154cc1)
2024-01-10 17:13:23 -08:00
Brooks Davis
1b0471936f libc: simplify MDASM/NOASM checks
Use boolean evaluation of :M matches and a single if statement.

Reviewed by:	imp, kib
Sponsored by:	DARPA
Differential Revision:	https://reviews.freebsd.org/D42915

(cherry picked from commit fc0288993cdad8a559fcd2c2166cf95f1fa43745)
2024-01-02 16:59:04 +00:00
Brooks Davis
9467188141 libc: Centralize non-building of sbrk stubs
The actual implementation of sbrk(2) is on top of the undocumented
break(2) system call.  On powerpc* this means we don't build _sbrk and
__sys_sbrk which were neither used nor exposed for linkage.  Otherwise
it is a no-op.

The addition to lib/libc/sys/Makefile.inc is a direct commit to
stable/14 in lieu of merging the removal of the sbrk and sstk syscalls.

(cherry picked from commit 7893419d492c40ca82b68fca3dcc0f5f7047d39b)

Reviewed by:	kib
Differential Revision:	https://reviews.freebsd.org/D43159
2024-01-02 16:22:13 +00:00
Brooks Davis
89ebe0ce1f memfd_create: move implementation to libc/gen
Due to memfd_create(3)'s construction of a path to pass to shm_open2(2),
it has a much larger than typical dependency footprint for a system
call wrapper (the list currently includes calloc, memset, sprintf, and
strlen).  As such, split it off into its own file under libc/gen to
lighten libc/sys's dependency list.

Reviewed by:	kevans, imp, emaste
Sponsored by:	DARPA
Differential Revision:	https://reviews.freebsd.org/D42709

(cherry picked from commit c3207e2d2554c8e36f9cf5950f8cd52a19fedfd5)
2023-12-21 18:13:18 +00:00
Brooks Davis
acf0f65f52 libc: remove unused stub vdso timecounter implementations
All supported architectures have shared page support so remove this
unused stub.

Reviewed by:	imp, kib
Differential Revision:	https://reviews.freebsd.org/D42619

(cherry picked from commit 500bf0592cf1de1d26369efe3877d812f724f5c0)
2023-12-13 22:08:14 +00:00
Brooks Davis
e150833764 libc: further centralize syscall symbols
All architectures necessarily implement _exit(2) and vfork(2) so
declare them in sys/Symbol.map.

Reviewed by:	imp, kib, emaste
Differential Revision:	https://reviews.freebsd.org/D42614

(cherry picked from commit e4a1800f06884dc00931f55d0fa8cd9ce473a83e)
2023-12-13 22:08:13 +00:00
Brooks Davis
695639d2f4 libc: Remove empty comments in Symbol.map
These were left over from $FreeBSD$ removal.

Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D42612

(cherry picked from commit 1ca63a8219b88b752b064d19bd3428c61dbcf1f9)
2023-12-13 22:08:13 +00:00
Brooks Davis
1c63aa2989 procctl.2: improve phrasing for ASLR disable
Reported by:	jrtc27
Reviewed by:	kib
Differential Revision:	https://reviews.freebsd.org/D42364

(cherry picked from commit 4894205482555447c6b3372598c7589a66596724)
2023-12-02 00:03:25 +00:00
Alan Somers
f23f9941f1 aio_read.2: correct the description of aio_buf
Looks like a copypasta from aio_write.2.

[skip ci]

Reported by:	Paul Floyd <pjfloyd@wanadoo.fr>
Sponsored by:	Axcient
Reviewed by:	jilles (manpages)
Differential Revision: https://reviews.freebsd.org/D42621

(cherry picked from commit 04cfe6c12ccc75624dc87ab8f44c4852b16f0c4f)
2023-11-30 13:38:09 -07:00
Warner Losh
4025b5b527 libc: Purge unneeded cdefs.h
These sys/cdefs.h are not needed. Purge them. They are mostly left-over
from the $FreeBSD$ removal. A few in libc are still required for macros
that cdefs.h defines. Keep those.

Sponsored by:		Netflix
Differential Revision:	https://reviews.freebsd.org/D42385

(cherry picked from commit 559a218c9b257775fb249b67945fe4a05b7a6b9f)
2023-11-26 21:20:09 -07:00
Olivier Certner
b018679002 ptrace(2): Disabling: Describe influence of security.bsd.see_jail_proc
Reviewed by:            mhorne, emaste, pauamma_gundo.com
MFC after:              2 weeks
Sponsored by:           Kumacom SAS
Differential Revision:  https://reviews.freebsd.org/D41109

(cherry picked from commit d952820105d6a2ad87ddf3bdc6c5fc5215d13b87)
2023-10-17 16:42:59 -03:00
Ed Maste
2fe06dda0a ktrace.2: correct kern.ktrace.genio_size sysctl name
The man page had `kern.ktrace.geniosize` but the sysctl node contains an
underscore.

PR:		274274
Reported by:	Ivan Rozhuk
Sponsored by:	The FreeBSD Foundation

(cherry picked from commit a572dfa1bfe00cec93b27d8848ca49562cab5e3c)
2023-10-13 10:12:34 -04:00
Ed Maste
f4bb052a78 swapon.2: correct FreeBSD release that introduced swapoff
It was introduced in 92da00bb24, after 5.0 and beforen 5.1.  Reported
in https://github.com/ziglang/zig/issues/16590.

(cherry picked from commit b15f6400376a90d3b00aa3ac00666f683f975376)
2023-09-21 12:52:46 -04:00
Mateusz Piotrowski
d2557f02d1 getdirentries.2: Reference dir(5)
As a note, parts of manual pages getdirentries(2) and dir(5) should
probably be consolidated.

MFC after:	3 days

(cherry picked from commit 5b7a776f481891f10820a0b4838d0e0feb60b8ad)
2023-09-12 13:48:18 +02:00
Mateusz Piotrowski
f4960baf80 getdirentries.2: Improve readability of dirent members
MFC after:	3 days

(cherry picked from commit 52d374a067002fc42409b32059ec8b8506a70429)
2023-09-12 13:48:11 +02:00
Mateusz Piotrowski
29a28b9940 getdirentries.2: Reference directory(3)
MFC after:	3 days

(cherry picked from commit 3a02df5e27d2eeabffd761ff5cb79496a6d796ea)
2023-09-12 13:48:03 +02:00
Jake Freeland
8544651dc5 timerfd: Add manual page.
This manual page accompanies the timerfd system calls.

Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D40218
2023-08-24 14:29:06 -06:00
Jake Freeland
af93fea710 timerfd: Move implementation from linux compat to sys/kern
Move the timerfd impelemntation from linux compat code to sys/kern. Use
it to implement the new system calls for timerfd. Add a hook to kern_tc
to allow timerfd to know when the system time has stepped. Add kqueue
support to timerfd. Adjust a few names to be less Linux centric.

RelNotes: YES
Reviewed by: markj (on irc), imp, kib (with reservations), jhb (slack)
Differential Revision: https://reviews.freebsd.org/D38459
2023-08-24 14:28:56 -06:00
Konstantin Belousov
4a69fc16a5 Add membarrier(2)
This is an attempt at clean-room implementation of the Linux'
membarrier(2) syscall.  For documentation, you would need to read
both membarrier(2) Linux man page, the comments in Linux
kernel/sched/membarrier.c implementation and possibly look at
actual uses.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D32360
2023-08-23 03:02:21 +03:00
Warner Losh
b2c76c41be Remove $FreeBSD$: one-line nroff pattern
Remove /^\.\\"\s*\$FreeBSD\$$\n/
2023-08-16 11:55:15 -06:00
Warner Losh
fa9896e082 Remove $FreeBSD$: two-line nroff pattern
Remove /^\.\\"\n\.\\"\s*\$FreeBSD\$$\n/
2023-08-16 11:55:10 -06:00
Warner Losh
d0b2dbfa0e Remove $FreeBSD$: one-line sh pattern
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
2023-08-16 11:55:03 -06:00
Warner Losh
1d386b48a5 Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
2023-08-16 11:54:42 -06:00
Warner Losh
42b388439b Remove $FreeBSD$: one-line .h pattern
Remove /^\s*\*+\s*\$FreeBSD\$.*$\n/
2023-08-16 11:54:23 -06:00
Warner Losh
b3e7694832 Remove $FreeBSD$: two-line .h pattern
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
2023-08-16 11:54:16 -06:00
Dmitry Chagin
f3e11927dc vm: Allow MAP_32BIT for all architectures
Reviewed by:		alc, kib, markj
Differential revision:	https://reviews.freebsd.org/D41435
2023-08-14 20:20:20 +03:00
Konstantin Belousov
41acfee690 libc vdso time functions: correctly convert errors into errnos
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2023-08-13 01:34:08 +03:00
Dmitry Chagin
03eab865aa man: Link _Fork(2) man page
Reviewed by:		kib
Differential Revision:	https://reviews.freebsd.org/D41221
MFC after:		1 week
2023-07-28 11:54:20 +03:00
Jens Schweikhardt
7a949a0f1c Correct grammo. 2023-07-08 14:25:44 +02:00