|
Revision tags: release/12.4.0, release/13.1.0 |
|
| #
1791debf |
| 08-Dec-2021 |
Konstantin Belousov <[email protected]> |
swapoff: add one more variant of the syscall
For MFC, COMPAT_FREEBSD13 braces were removed.
(cherry picked from commit 5346570276a5ddfd5f530201fcbf24ddcc53033d)
|
|
Revision tags: release/12.3.0 |
|
| #
1c54a109 |
| 02-Aug-2021 |
Konstantin Belousov <[email protected]> |
Add _Fork()
(cherry picked from commit 49ad342cc10cba14b3a40ba26cf8bb2150e2925a)
|
|
Revision tags: release/13.0.0 |
|
| #
21f749da |
| 10-Jan-2021 |
Konstantin Belousov <[email protected]> |
libthr: wrap pdfork(2), same as fork(2).
Without wrapping, rtld services and malloc(3) are not guaranteed to operate correctly in the forked child.
Reviewed by: markj MFC after: 1 week Sponsored by
libthr: wrap pdfork(2), same as fork(2).
Without wrapping, rtld services and malloc(3) are not guaranteed to operate correctly in the forked child.
Reviewed by: markj MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D28088
show more ...
|
| #
022ca2fc |
| 02-Jan-2021 |
Alan Somers <[email protected]> |
Add aio_writev and aio_readv
POSIX AIO is great, but it lacks vectored I/O functions. This commit fixes that shortcoming by adding aio_writev and aio_readv. They aren't part of the standard, but the
Add aio_writev and aio_readv
POSIX AIO is great, but it lacks vectored I/O functions. This commit fixes that shortcoming by adding aio_writev and aio_readv. They aren't part of the standard, but they're an obvious extension. They work just like their synchronous equivalents pwritev and preadv.
It isn't yet possible to use vectored aiocbs with lio_listio, but that could be added in the future.
Reviewed by: jhb, kib, bcr Relnotes: yes Differential Revision: https://reviews.freebsd.org/D27743
show more ...
|
|
Revision tags: release/12.2.0 |
|
| #
3ef55e8f |
| 09-Sep-2020 |
Konstantin Belousov <[email protected]> |
Add shm_create_largepage(3) helper for creation and configuration of largepage shm objects.
And since we can, add memfd_create(MFD_HUGETLB) support, hopefully close enough to the Linux feature.
Rev
Add shm_create_largepage(3) helper for creation and configuration of largepage shm objects.
And since we can, add memfd_create(MFD_HUGETLB) support, hopefully close enough to the Linux feature.
Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D24652
show more ...
|
|
Revision tags: release/11.4.0 |
|
| #
6f05ed08 |
| 28-May-2020 |
Rick Macklem <[email protected]> |
Add an entry to Symbol.map for the rpctls_syscall added by r361599.
Reviewed by: brooks Differential Revision: https://reviews.freebsd.org/D24949
|
| #
7d03e081 |
| 14-Apr-2020 |
Kyle Evans <[email protected]> |
Mark closefrom(2) COMPAT12, reimplement in libc to wrap close_range
Include a temporarily compatibility shim as well for kernels predating close_range, since closefrom is used in some critical areas
Mark closefrom(2) COMPAT12, reimplement in libc to wrap close_range
Include a temporarily compatibility shim as well for kernels predating close_range, since closefrom is used in some critical areas.
Reviewed by: markj (previous version), kib Differential Revision: https://reviews.freebsd.org/D24399
show more ...
|
| #
472ced39 |
| 12-Apr-2020 |
Kyle Evans <[email protected]> |
Implement a close_range(2) syscall
close_range(min, max, flags) allows for a range of descriptors to be closed. The Python folk have indicated that they would much prefer this interface to closefrom
Implement a close_range(2) syscall
close_range(min, max, flags) allows for a range of descriptors to be closed. The Python folk have indicated that they would much prefer this interface to closefrom(2), as the case may be that they/someone have special fds dup'd to higher in the range and they can't necessarily closefrom(min) because they don't want to hit the upper range, but relocating them to lower isn't necessarily feasible.
sys_closefrom has been rewritten to use kern_close_range() using ~0U to indicate closing to the end of the range. This was chosen rather than requiring callers of kern_close_range() to hold FILEDESC_SLOCK across the call to kern_close_range for simplicity.
The flags argument of close_range(2) is currently unused, so any flags set is currently EINVAL. It was added to the interface in Linux so that future flags could be added for, e.g., "halt on first error" and things of this nature.
This patch is based on a syscall of the same design that is expected to be merged into Linux.
Reviewed by: kib, markj, vangyzen (all slightly earlier revisions) Differential Revision: https://reviews.freebsd.org/D21627
show more ...
|
| #
146fc63f |
| 09-Feb-2020 |
Konstantin Belousov <[email protected]> |
Add a way to manage thread signal mask using shared word, instead of syscall.
A new syscall sigfastblock(2) is added which registers a uint32_t variable as containing the count of blocks for signal
Add a way to manage thread signal mask using shared word, instead of syscall.
A new syscall sigfastblock(2) is added which registers a uint32_t variable as containing the count of blocks for signal delivery. Its content is read by kernel on each syscall entry and on AST processing, non-zero count of blocks is interpreted same as the signal mask blocking all signals.
The biggest downside of the feature that I see is that memory corruption that affects the registered fast sigblock location, would cause quite strange application misbehavior. For instance, the process would be immune to ^C (but killable by SIGKILL).
With consumers (rtld and libthr added), benchmarks do not show a slow-down of the syscalls in micro-measurements, and macro benchmarks like buildworld do not demonstrate a difference. Part of the reason is that buildworld time is dominated by compiler, and clang already links to libthr. On the other hand, small utilities typically used by shell scripts have the total number of syscalls cut by half.
The syscall is not exported from the stable libc version namespace on purpose. It is intended to be used only by our C runtime implementation internals.
Tested by: pho Disscussed with: cem, emaste, jilles Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D12773
show more ...
|
|
Revision tags: release/12.1.0 |
|
| #
9afb12ba |
| 26-Sep-2019 |
David Bright <[email protected]> |
Add an shm_rename syscall
Add an atomic shm rename operation, similar in spirit to a file rename. Atomically unlink an shm from a source path and link it to a destination path. If an existing shm is
Add an shm_rename syscall
Add an atomic shm rename operation, similar in spirit to a file rename. Atomically unlink an shm from a source path and link it to a destination path. If an existing shm is linked at the destination path, unlink it as part of the same atomic operation. The caller needs the same permissions as shm_unlink to the shm being renamed, and the same permissions for the shm at the destination which is being unlinked, if it exists. If those fail, EACCES is returned, as with the other shm_* syscalls.
truss support is included; audit support will come later.
This commit includes only the implementation; the sysent-generated bits will come in a follow-on commit.
Submitted by: Matthew Bryan <[email protected]> Reviewed by: jilles (earlier revision) Reviewed by: brueffer (manpages, earlier revision) Relnotes: yes Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D21423
show more ...
|
| #
3e25d1fb |
| 25-Sep-2019 |
Kyle Evans <[email protected]> |
Add linux-compatible memfd_create
memfd_create is effectively a SHM_ANON shm_open(2) mapping with optional CLOEXEC and file sealing support. This is used by some mesa parts, some linux libs, and qem
Add linux-compatible memfd_create
memfd_create is effectively a SHM_ANON shm_open(2) mapping with optional CLOEXEC and file sealing support. This is used by some mesa parts, some linux libs, and qemu can also take advantage of it and uses the sealing to prevent resizing the region.
This reimplements shm_open in terms of shm_open2(2) at the same time.
shm_open(2) will be moved to COMPAT12 shortly.
Reviewed by: markj, kib Differential Revision: https://reviews.freebsd.org/D21393
show more ...
|
| #
d05b53e0 |
| 03-Sep-2019 |
Mateusz Guzik <[email protected]> |
Add sysctlbyname system call
Previously userspace would issue one syscall to resolve the sysctl and then another one to actually use it. Do it all in one trip.
Fallback is provided in case newer li
Add sysctlbyname system call
Previously userspace would issue one syscall to resolve the sysctl and then another one to actually use it. Do it all in one trip.
Fallback is provided in case newer libc happens to be running on an older kernel.
Submitted by: Pawel Biernacki Reported by: kib, brooks Differential Revision: https://reviews.freebsd.org/D17282
show more ...
|
| #
78756b9e |
| 25-Jul-2019 |
Rick Macklem <[email protected]> |
Add libc support for the copy_file_range(2) syscall added by r350315.
copy_file_range.2 is a new man page (content change).
Reviewed by: kib, asomers Relnotes: yes Differential Revision: https://re
Add libc support for the copy_file_range(2) syscall added by r350315.
copy_file_range.2 is a new man page (content change).
Reviewed by: kib, asomers Relnotes: yes Differential Revision: https://reviews.freebsd.org/D20584
show more ...
|
|
Revision tags: release/11.3.0 |
|
| #
a1304030 |
| 06-Apr-2019 |
Mariusz Zaborski <[email protected]> |
Introduce funlinkat syscall that always us to check if we are removing the file associated with the given file descriptor.
Reviewed by: kib, asomers Reviewed by: cem, jilles, brooks (they reviewed p
Introduce funlinkat syscall that always us to check if we are removing the file associated with the given file descriptor.
Reviewed by: kib, asomers Reviewed by: cem, jilles, brooks (they reviewed previous version) Discussed with: pjd, and many others Differential Revision: https://reviews.freebsd.org/D14567
show more ...
|
| #
d1fd400a |
| 07-Dec-2018 |
Konstantin Belousov <[email protected]> |
Add new file handle system calls.
Namely, getfhat(2), fhlink(2), fhlinkat(2), fhreadlink(2). The syscalls are provided for a NFS userspace server (nfs-ganesha).
Submitted by: Jack Halford <jack@ga
Add new file handle system calls.
Namely, getfhat(2), fhlink(2), fhlinkat(2), fhreadlink(2). The syscalls are provided for a NFS userspace server (nfs-ganesha).
Submitted by: Jack Halford <[email protected]> Sponsored by: Gandi.net Tested by: pho Feedback from: brooks, markj MFC after: 1 week Differential revision: https://reviews.freebsd.org/D18359
show more ...
|
|
Revision tags: release/12.0.0 |
|
| #
7cc923f8 |
| 10-Jul-2018 |
Brooks Davis <[email protected]> |
Get rid of netbsd_lchown and netbsd_msync syscall entries.
No valid FreeBSD binary very called them (they would call lchown and msync directly) and we haven't supported NetBSD binaries in ages.
Thi
Get rid of netbsd_lchown and netbsd_msync syscall entries.
No valid FreeBSD binary very called them (they would call lchown and msync directly) and we haven't supported NetBSD binaries in ages.
This is a respin of r335983 with a workaround for the ancient BFD linker in the libc stubs.
Reviewed by: kib Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D16193
show more ...
|
| #
714c03c8 |
| 05-Jul-2018 |
Brooks Davis <[email protected]> |
Revert r335983.
The bfd linker in tree doesn't support multiple names for the same symbol (at least with current flags).
|
| #
5b04a71d |
| 05-Jul-2018 |
Brooks Davis <[email protected]> |
Get rid of netbsd_lchown and netbsd_msync syscall entries.
No valid FreeBSD binary ever called them (they would call lchown and msync directly) and we haven't supported NetBSD binaries in ages.
Rev
Get rid of netbsd_lchown and netbsd_msync syscall entries.
No valid FreeBSD binary ever called them (they would call lchown and msync directly) and we haven't supported NetBSD binaries in ages.
Reviewed by: kib Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D15814
show more ...
|
|
Revision tags: release/11.2.0 |
|
| #
7351a8bd |
| 25-May-2018 |
Brooks Davis <[email protected]> |
Make vadvise compat freebsd11.
The vadvise syscall (aka ovadvise) is undocumented and has always been implmented as returning EINVAL. Put the syscall under COMPAT11 and provide a userspace implemen
Make vadvise compat freebsd11.
The vadvise syscall (aka ovadvise) is undocumented and has always been implmented as returning EINVAL. Put the syscall under COMPAT11 and provide a userspace implementation.
Reviewed by: kib Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D15557
show more ...
|
| #
08a7e74c |
| 21-Mar-2018 |
Conrad Meyer <[email protected]> |
getentropy(3): Fallback to kern.arandom sysctl on older kernels
On older kernels, when userspace program disables SIGSYS, catch ENOSYS and emulate getrandom(2) syscall with the kern.arandom sysctl (
getentropy(3): Fallback to kern.arandom sysctl on older kernels
On older kernels, when userspace program disables SIGSYS, catch ENOSYS and emulate getrandom(2) syscall with the kern.arandom sysctl (via existing arc4_sysctl wrapper).
Special care is taken to faithfully emulate EFAULT on NULL pointers, because sysctl(3) as used by kern.arandom ignores NULL oldp. (This was caught by getentropy(3) ATF tests.)
Reported by: kib Reviewed by: kib Discussed with: delphij Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D14785
show more ...
|
| #
e9ac2743 |
| 21-Mar-2018 |
Conrad Meyer <[email protected]> |
Implement getrandom(2) and getentropy(3)
The general idea here is to provide userspace programs with well-defined sources of entropy, in a fashion that doesn't require opening a new file descriptor
Implement getrandom(2) and getentropy(3)
The general idea here is to provide userspace programs with well-defined sources of entropy, in a fashion that doesn't require opening a new file descriptor (ulimits) or accessing paths (/dev/urandom may be restricted by chroot or capsicum).
getrandom(2) is the more general API, and comes from the Linux world. Since our urandom and random devices are identical, the GRND_RANDOM flag is ignored.
getentropy(3) is added as a compatibility shim for the OpenBSD API.
truss(1) support is included.
Tests for both system calls are provided. Coverage is believed to be at least as comprehensive as LTP getrandom(2) test coverage. Additionally, instructions for running the LTP tests directly against FreeBSD are provided in the "Test Plan" section of the Differential revision linked below. (They pass, of course.)
PR: 194204 Reported by: David CARLIER <david.carlier AT hardenedbsd.org> Discussed with: cperciva, delphij, jhb, markj Relnotes: maybe Differential Revision: https://reviews.freebsd.org/D14500
show more ...
|
| #
3f289c3f |
| 12-Jan-2018 |
Jeff Roberson <[email protected]> |
Implement 'domainset', a cpuset based NUMA policy mechanism. This allows userspace to control NUMA policy administratively and programmatically.
Implement domainset based iterators in the page laye
Implement 'domainset', a cpuset based NUMA policy mechanism. This allows userspace to control NUMA policy administratively and programmatically.
Implement domainset based iterators in the page layer.
Remove the now legacy numa_* syscalls.
Cleanup some header polution created by having seq.h in proc.h.
Reviewed by: markj, kib Discussed with: alc Tested by: pho Sponsored by: Netflix, Dell/EMC Isilon Differential Revision: https://reviews.freebsd.org/D13403
show more ...
|
|
Revision tags: release/10.4.0, release/11.1.0 |
|
| #
1bf9ff76 |
| 20-Jul-2017 |
Alan Somers <[email protected]> |
Remove some private symbols from librt
Private functions like __aio_read and _aio_read were exposed in FBSDprivate_1.0 by r169090, even though they've never been used outside of librt. Also, remove
Remove some private symbols from librt
Private functions like __aio_read and _aio_read were exposed in FBSDprivate_1.0 by r169090, even though they've never been used outside of librt. Also, remove some weak references from r156136 that have never resolved.
Reviewed by: kib MFC after: 3 weeks Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D11649
show more ...
|
| #
2b34e843 |
| 17-Jun-2017 |
Konstantin Belousov <[email protected]> |
Add abstime kqueue(2) timers and expand struct kevent members.
This change implements NOTE_ABSTIME flag for EVFILT_TIMER, which specifies that the data field contains absolute time to fire the event
Add abstime kqueue(2) timers and expand struct kevent members.
This change implements NOTE_ABSTIME flag for EVFILT_TIMER, which specifies that the data field contains absolute time to fire the event.
To make this useful, data member of the struct kevent must be extended to 64bit. Using the opportunity, I also added ext members. This changes struct kevent almost to Apple struct kevent64, except I did not changed type of ident and udata, the later would cause serious API incompatibilities.
The type of ident was kept uintptr_t since EVFILT_AIO returns a pointer in this field, and e.g. CHERI is sensitive to the type (discussed with brooks, jhb).
Unlike Apple kevent64, symbol versioning allows us to claim ABI compatibility and still name the new syscall kevent(2). Compat shims are provided for both host native and compat32.
Requested by: bapt Reviewed by: bapt, brooks, ngie (previous version) Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D11025
show more ...
|
| #
69921123 |
| 23-May-2017 |
Konstantin Belousov <[email protected]> |
Commit the 64-bit inode project.
Extend the ino_t, dev_t, nlink_t types to 64-bit ints. Modify struct dirent layout to add d_off, increase the size of d_fileno to 64-bits, increase the size of d_na
Commit the 64-bit inode project.
Extend the ino_t, dev_t, nlink_t types to 64-bit ints. Modify struct dirent layout to add d_off, increase the size of d_fileno to 64-bits, increase the size of d_namlen to 16-bits, and change the required alignment. Increase struct statfs f_mntfromname[] and f_mntonname[] array length MNAMELEN to 1024.
ABI breakage is mitigated by providing compatibility using versioned symbols, ingenious use of the existing padding in structures, and by employing other tricks. Unfortunately, not everything can be fixed, especially outside the base system. For instance, third-party APIs which pass struct stat around are broken in backward and forward incompatible ways.
Kinfo sysctl MIBs ABI is changed in backward-compatible way, but there is no general mechanism to handle other sysctl MIBS which return structures where the layout has changed. It was considered that the breakage is either in the management interfaces, where we usually allow ABI slip, or is not important.
Struct xvnode changed layout, no compat shims are provided.
For struct xtty, dev_t tty device member was reduced to uint32_t. It was decided that keeping ABI compat in this case is more useful than reporting 64-bit dev_t, for the sake of pstat.
Update note: strictly follow the instructions in UPDATING. Build and install the new kernel with COMPAT_FREEBSD11 option enabled, then reboot, and only then install new world.
Credits: The 64-bit inode project, also known as ino64, started life many years ago as a project by Gleb Kurtsou (gleb). Kirk McKusick (mckusick) then picked up and updated the patch, and acted as a flag-waver. Feedback, suggestions, and discussions were carried by Ed Maste (emaste), John Baldwin (jhb), Jilles Tjoelker (jilles), and Rick Macklem (rmacklem). Kris Moore (kris) performed an initial ports investigation followed by an exp-run by Antoine Brodin (antoine). Essential and all-embracing testing was done by Peter Holm (pho). The heavy lifting of coordinating all these efforts and bringing the project to completion were done by Konstantin Belousov (kib).
Sponsored by: The FreeBSD Foundation (emaste, kib) Differential revision: https://reviews.freebsd.org/D10439
show more ...
|