| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The O_RESOLVE_BENEATH openat(2) flag restricts name lookups such that
they remain under the directory referenced by the dirfd. This commit
introduces an implicit version of the flag, FD_RESOLVE_BENEATH, stored
in the file descriptor entry. When the flag is set, any lookup relative
to that fd automatically has O_RESOLVE_BENEATH semantics. Furthermore,
the flag is sticky, meaning that it cannot be cleared, and it is copied
by dup() and openat().
File descriptors with FD_RESOLVE_BENEATH set may not be passed to
fchdir(2) or fchroot(2). Various fd lookup routines are modified to
return fd flags to the caller.
This flag will be used to address a case where jails with different root
directories and the ability to pass SCM_RIGHTS messages across the jail
boundary can transfer directory fds in such as way as to allow a
filesystem escape.
PR: 262180
Reviewed by: kib
MFC after: 3 weeks
Differential Revision: https://reviews.freebsd.org/D50371
(cherry picked from commit f35525ff2053e026a423e852136d73ed93c95803)
|
| |
|
|
|
|
|
|
|
|
| |
MFC after: 1 week
Sponsored by: Klara, Inc.
Sponsored by: NetApp, Inc.
Reviewed by: bcr
Differential Revision: https://reviews.freebsd.org/D51946
(cherry picked from commit 4eaa7f66620c33957ff9a929820cb791f7fe5578)
|
| |
|
|
|
|
|
|
| |
Reviewed by: emaste
Sponsored by: The FreeBSD Foundation
(cherry picked from commit dab59af3bcc7cb7ba01569d3044894b3e860ad56)
(cherry picked from commit ef3ed0726f2230e38df76a32a3b9ff145147af65)
|
| |
|
|
|
|
|
|
|
| |
len is unsigned (it is size_t), so cannot be negative.
Sponsored by: The FreeBSD Foundation
(cherry picked from commit fab411c4fd5224e3dd44e0eb288d60b27480e2d1)
(cherry picked from commit e2cbfa1f5045019d34eb0091db7755c151ea06d5)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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: dabee6fecc67 ("kern_descrip.c: add fdshare()/fdcopy()")
Differential Revision: https://reviews.freebsd.org/D48465
(cherry picked from commit 9e36aaf0c24cf158e83c69c1d2312c000c3c36f3)
(cherry picked from commit 61c50909354ace6f07d0b2113f10965f4546e0ed)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Add some missing .Pp macros after the end of literal blocks and some
lists to ensure there is a blank line before the following text.
- Use an indent of Ds for nested lists to reduce excessive indentation and
make the bodies of the nested list items easier to read.
- Various and sundry rewordings and clarifications.
Reviewed by: kib, emaste
Differential Revision: https://reviews.freebsd.org/D47782
(cherry picked from commit 8277c790179304159c2e4dcb1d99552518d5be8e)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These were reported by `mandoc -T lint` as
ERROR: skipping unknown macro
When these pages were rendered with `man`, the "unknown macro" meant
that the entire line was omitted from the output.
Obvious typos in:
lib/libsys/swapon.2
lib/libsys/procctl.2
share/man/man9/firmware.9
lib/libcasper/services/cap_net/cap_net.3: 'mode' describes a function
argument.
lib/libsys/statfs.2: there's no .Tm command ("trademark?"), and
.Tn ("tradename") is deprecated, so remove the macro entirely.
usr.sbin/mfiutil/mfiutil.8: man was interpreting '/dev/' as a macro
(which it didn't recognize).
share/man/man4/qat.4: same issue as above, but with '0'. In this case,
given the context of the previous line, rewriting as "Value '0'"
seemed more appropriate.
usr.sbin/mlx5tool/mlx5tool.8: typo in .Xr
Signed-off-by: Graham Percival <gperciva@tarsnap.com>
Sponsored by: Tarsnap Backup Inc.
Reviewed by: concussious, imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1417
(cherry picked from commit 2878d99dfcfbdd7a415a7f31cf95fbd53fc8e581)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These were reported by `mandoc -T lint ...` as errors.
fhlink.2, fhreadlink.2: remove unneeded block closing.
getfh.2, procctl.2: add necessary block closing.
ptrace.2: -width only takes one argument.
swapon.2: <sys/vmparam.h> and <vm/swap_pager.h> weren't being displayed,
because .It is for a list item whereas .In is for included files.
Also, we want a blank line between <sys/ > headers and the other
one.
Signed-off-by: Graham Percival <gperciva@tarsnap.com>
PR: 281597
Reviewed by: mhorne
Sponsored by: Tarsnap Backup Inc.
(cherry picked from commit 650056363baddb83c61c85b0539ee536f3d4b56c)
|
| |
|
|
|
|
|
|
|
|
| |
Fixes: 421025a274fb
PR: 262895
MFC after: 3 days
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D45240
(cherry picked from commit a4be1eb21165d7aedae9dc6634528619ff10d025)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The CLOCK_* constants are "defined variable or preprocessor constants"
and so use .Dv.
Reviewed by: imp
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D45106
(cherry picked from commit 2d29d2ecebf8ea19221995b3ea2e3a7ac700bf81)
(cherry picked from commit 0e0220d11addc60fe7ed6fca79aefac2a3a9af27)
|
| |
|
|
|
|
|
|
| |
Clarify that CLOCK_* (e.g., CLOCK_REALTIME) do not necessarily default
to CLOCK_*_FAST.
PR: 259642
(cherry picked from commit 16e4487e5f82e1ff501fe5af6afbfbd0435a1cbf)
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
As kib@ noted:
> Obviously gettimeofday(2) is not going to be removed
> even in the far future.
Reported by: kib
Fixes: 4395d3ced5cf Document that gettimeofday() is obsolescent
MFC after: 3 days
(cherry picked from commit 6662c2312e956439652ce2d06b42753b6a78fc61)
|
| |
|
|
|
|
|
|
|
| |
Reported by: kaktus
Reviewed by: kaktus, pstef
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D23942
(cherry picked from commit 4395d3ced5cfa46df400b5bb9996f9d74476997e)
|
| |
|
|
|
|
| |
PR: 276937
(cherry picked from commit 3e9515846f8cbff0ecccaab65d9f70890d04429e)
|
| |
|
|
| |
(cherry picked from commit 211bdd601ee51f90da9b123807ef68ac122116b9)
|
| |
|
|
| |
(cherry picked from commit a570fe4d0dd979ce099374259ffc45d56ae4e471)
|
| |
|
|
|
|
| |
- s/interpeted/interpreted/
(cherry picked from commit b2ec175fcaac90fc6a1caf066656eaa092f32611)
|
| |
|
|
|
|
| |
- s/successfull/successful/
(cherry picked from commit a70008e95b907336bddbcc2aa9d567df6e3a41b6)
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
| |
|
|
|
|
|
|
|
|
| |
[skip ci]
Sponsored by: Axcient
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D42865
(cherry picked from commit c2ed7a63604fc86244adee2966e19f8aba2a07cb)
|
| |
|
|
|
|
|
| |
MFC after: 1 week
Sponsored by: Klara, Inc.
(cherry picked from commit ee7d5ba1b55441476643983d3f70df5ee9ea97c4)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
| |
|
|
|
|
|
|
|
|
| |
Reviewed by: mhorne, emaste, pauamma_gundo.com
Sponsored by: Kumacom SAS
Differential Revision: https://reviews.freebsd.org/D41109
(cherry picked from commit d952820105d6a2ad87ddf3bdc6c5fc5215d13b87)
Approved by: markj (mentor)
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
| |
|
|
|
|
|
|
| |
Reported by: jrtc27
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D42364
(cherry picked from commit 4894205482555447c6b3372598c7589a66596724)
|
| |
|
|
| |
(cherry picked from commit 4a69fc16a583face922319c476f3e739d9ce9140)
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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)
(cherry picked from commit 2fe06dda0a8abced5851188ed2cb76d1759efa19)
|
| |
|
|
|
|
| |
MFC after: 3 days
(cherry picked from commit 13a9da7d5550392a754fcc72d8ec74c0ddbec26f)
|
| |
|
|
|
|
|
|
| |
Sponsored by: The FreeBSD Foundation
(cherry picked from commit 7fde0187cc443468561f0a30d589ff0cfe45eef5)
(cherry picked from commit 560e22c8fe460e00d16e5268fe1fbb316ad81101)
(cherry picked from commit 5b5fa75acff11d871d0c90045f8c1a58fed85365)
|
| |
|
|
|
|
|
|
| |
It was introduced in 92da00bb245b, after 5.0 and beforen 5.1. Reported
in https://github.com/ziglang/zig/issues/16590.
(cherry picked from commit b15f6400376a90d3b00aa3ac00666f683f975376)
(cherry picked from commit f4bb052a789eae8ddcbfa7a9c00bc781b54e13c4)
|
| |
|
|
|
|
|
|
|
| |
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)
|
| |
|
|
|
|
| |
MFC after: 3 days
(cherry picked from commit 52d374a067002fc42409b32059ec8b8506a70429)
|
| |
|
|
|
|
| |
MFC after: 3 days
(cherry picked from commit 3a02df5e27d2eeabffd761ff5cb79496a6d796ea)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Allow multiple vector IOs to be started with one system call.
aio_readv() and aio_writev() already used these opcodes under the
covers. This commit makes them available to user space.
Being non-standard extensions, they're only visible if __BSD_VISIBLE is
defined, like the functions.
Reviewed by: asomers, kib
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D31627
(cherry picked from commit f30a1ae8d5290a52e898279bafc38556bf16bed8)
|
| |
|
|
|
|
|
| |
Remove /^\.\\"\s*\$FreeBSD\$$\n/
Similar commit in main:
(cherry picked from commit b2c76c41be32)
|
| |
|
|
|
|
|
| |
Remove /^\.\\"\n\.\\"\s*\$FreeBSD\$$\n/
Similar commit in main:
(cherry picked from commit fa9896e082a1)
|
| |
|
|
|
|
|
| |
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
Similar commit in main:
(cherry picked from commit d0b2dbfa0ecf)
|
| |
|
|
|
|
|
| |
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
Similar commit in main:
(cherry picked from commit 1d386b48a555)
|
| |
|
|
|
|
|
| |
Remove /^\s*\*+\s*\$FreeBSD\$.*$\n/
Similar commit in main:
(cherry picked from commit 42b388439bd3)
|
| |
|
|
|
|
|
| |
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
Similar commit in main:
(cherry picked from commit b3e7694832e8)
|
| |
|
|
| |
(cherry picked from commit 41acfee690da6289d570338e6365c1d7ef61dad5)
|
| |
|
|
|
|
|
|
| |
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D41221
MFC after: 1 week
(cherry picked from commit 03eab865aabab1e6737ad0fd1537f7d0a8c3ee02)
|
| |
|
|
|
|
|
|
|
|
|
| |
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.
Discussed with: pfg
MFC After: 3 days
Sponsored by: Netflix
(cherry picked from commit 4d846d260e2b9a3d4d0a701462568268cbfe7a5b)
|
| |
|
|
| |
(cherry picked from commit 1fc174cba6e0b949f7499d195dc36bf8df15df4f)
|
| |
|
|
|
|
| |
PR: 271704
(cherry picked from commit 7a292504bad8467915f072f0576b2a07c76de1f5)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As documented in listen.2 manual page, the kernel emits a LOG_DEBUG
syslog message if a socket listen queue overflows. For some appliances,
it may be desirable to change the priority to some higher value
like LOG_INFO while keeping other debugging suppressed.
OTOH there are cases when such overflows are normal and expected.
Then it may be desirable to suppress overflow logging altogether,
so that dmesg buffer is not flooded over long run.
In addition to existing sysctl kern.ipc.sooverinterval,
introduce new sysctl kern.ipc.sooverprio that defaults to 7 (LOG_DEBUG)
to preserve current behavior. It may be changed to any value
in a range of 0..7 for corresponding priority or to -1 to suppress logging.
Document it in the listen.2 manual page.
(cherry picked from commit 4824d788725987bccff53dec8c103cbac455b3ed)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Building with -DMSDOSFS_DEBUG failed due to a format mismatch and
a variable that has been renamed but not updated in the printf()
parameter list.
(cherry picked from commit 2d8cf575d5778781928699f9b7cfb448bd2f1f8e)
fs/msdosfs: add tracking of free root directory entries
This update implements tallying of free directory entries during
create, delete, or rename operations on FAT12 and FAT16 file systems.
Prior to this change, the total number of root directory entries
was reported as number of inodes, but 0 as the number of free
inodes, causing system health monitoring software to warn about
a suspected disk full issue.
The FAT12 and FAT16 file systems provide a limited number of
root directory entries, e.g. 512 on typical hard disk formats.
The valid range of values is 1 to 65535, but the msdosfs code
will effectively round up "odd" values to the next multiple of 16
(e.g. 513 would allow for 528 root directory entries).
This update implements tracking of directory entries during create,
delete, or rename operations, with initial values determined by
scanning the directory when the file system is mounted.
Total and free directory entries are reported in the f_files and
f_ffree elements of struct statfs, despite differences in semantics
of these values:
- There is no limit on the number of files and directories that can
be created on a FAT file system. Only the root directory of FAT12
and FAT16 file systems is limited, any number of files can still be
created in sub-directories, even when 0 free "inodes" are reported.
- A single file can require 1 to 21 directory entries, depending on
the character set, structure, and length of the name. The DOS 8.3
style file name takes up 1 entry, and if the name does not comply
with the syntax of a DOS 8.3 file name, 1 additional entry is used
for each 13 characters of the file name. Since all these entries
have to be contiguous, it is possible that a file or directory with
a long name can not be created, despite a sufficient total number of
free directory entries.
- Renaming a file can require more directory entries than currently
allocated to store its long name, which may prevent an in-place
update of the name if more entries are needed. This may cause a
rename operation to fail if no contiguous range of free entries for
the new name can be found.
- The volume label is stored in a directory entry. An empty FAT file
system with a volume label will therefore show 1 used "inode" in
df.
- The perceentage of free inodes shown in df or monitoring tools does
only represent the state of the root directory of a FAT12 or FAT16
file system. Neither does a reported value of 0% free inodes does
prevent files from being created in sub-directories, nor does a
value of 50% free inodes guarantee that even a single file with
a "long" name can be created in the root directory (if every other
directory entry is occupied and there are no 2 contiguous entries).
The statfs(2) and df(1) man pages have been updated with a notice
regarding the possibly different semantics of values reported as
total and free inodes for non-Unix file systems.
PR: 270053
Reported by: Ben Woods <woodsb02@freebsd.org>
Approved by: mckusick
Differential Revision: https://reviews.freebsd.org/D38987
(cherry picked from commit c33db74b5323480fba7adef58e8aa88f6091d134)
fs/msdosfs: Fix potential panic and size calculations
Some combinations of FAT12 file system parameters could cause a kernel
panic due to an unmapped access if the size of the FAT was larger than
the CPU page size. The reason is that FAT12 uses 3 bytes to store
2 FAT pointers, leading to partial FAT pointers at the end of buffers
of a size that is not a multiple of 3.
With a typical page size of 4 KB, this caused the FAT entry at byte
offsets 4095 and 4096 to cross the page boundary, with only the first
page mapped. This was fixed by adjusting the mapping to always cover
both bytes of each FAT entry.
Testing revealed 2 other inconsistencies that are fixed by this commit:
1) The calculation of the size of the data area did not take into
account the fact that the first two data block numbers are reserved
and that the data area starts with block 2. This could cause a
FAT12 file system created with the maximum supported number of
blocks to be incorrectly identified as FAT16.
2) The root directory does not take up space in the data area of a
FAT12 or FAT16 file system, since it is placed into a reserved
area outside of that data area. This commits makes stat() report
the logical size of the root directory, but with 0 blocks allocated
from the data area.
PR: 270587
Reviewed by: mckusick
Differential Revision: https://reviews.freebsd.org/D39386
(cherry picked from commit 0728695c63efda298feccefb3615c23cb6682929)
|
| |
|
|
|
|
| |
PR: 270785
(cherry picked from commit 93ca6ff2958cace3b7b883ed797ea6539881a6a2)
|
| |
|
|
| |
(cherry picked from commit 77f0e198d9134b6ca2650d3a84d7db2d786ec0c0)
|