aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/init_sysent.c
Commit message (Collapse)AuthorAgeFilesLines
* Regen.Konstantin Belousov2025-07-061-1/+1
|
* inotify: Regenerate syscall definitionsMark Johnston2025-07-041-0/+2
| | | | Sponsored by: Klara, Inc.
* RegenKonstantin Belousov2025-05-311-0/+1
|
* sysent: regen for deletion of gssd_syscall and new ABI for rpctls_syscallGleb Smirnoff2025-02-011-1/+1
|
* New setcred() system call and associated MAC hooksOlivier Certner2024-12-161-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This new system call allows to set all necessary credentials of a process in one go: Effective, real and saved UIDs, effective, real and saved GIDs, supplementary groups and the MAC label. Its advantage over standard credential-setting system calls (such as setuid(), seteuid(), etc.) is that it enables MAC modules, such as MAC/do, to restrict the set of credentials some process may gain in a fine-grained manner. Traditionally, credential changes rely on setuid binaries that call multiple credential system calls and in a specific order (setuid() must be last, so as to remain root for all other credential-setting calls, which would otherwise fail with insufficient privileges). This piecewise approach causes the process to transiently hold credentials that are neither the original nor the final ones. For the kernel to enforce that only certain transitions of credentials are allowed, either these possibly non-compliant transient states have to disappear (by setting all relevant attributes in one go), or the kernel must delay setting or checking the new credentials. Delaying setting credentials could be done, e.g., by having some mode where the standard system calls contribute to building new credentials but without committing them. It could be started and ended by a special system call. Delaying checking could mean that, e.g., the kernel only verifies the credentials transition at the next non-credential-setting system call (we just mention this possibility for completeness, but are certainly not endorsing it). We chose the simpler approach of a new system call, as we don't expect the set of credentials one can set to change often. It has the advantages that the traditional system calls' code doesn't have to be changed and that we can establish a special MAC protocol for it, by having some cleanup function called just before returning (this is a requirement for MAC/do), without disturbing the existing ones. The mac_cred_check_setcred() hook is passed the flags received by setcred() (including the version) and both the old and new kernel's 'struct ucred' instead of 'struct setcred' as this should simplify evolving existing hooks as the 'struct setcred' structure evolves. The mac_cred_setcred_enter() and mac_cred_setcred_exit() hooks are always called by pairs around potential calls to mac_cred_check_setcred(). They allow MAC modules to allocate/free data they may need in their mac_cred_check_setcred() hook, as the latter is called under the current process' lock, rendering sleepable allocations impossible. MAC/do is going to leverage these in a subsequent commit. A scheme where mac_cred_check_setcred() could return ERESTART was considered but is incompatible with proper composition of MAC modules. While here, add missing includes and declarations for standalone inclusion of <sys/ucred.h> both from kernel and userspace (for the latter, it has been working thanks to <bsm/audit.h> already including <sys/types.h>). Reviewed by: brooks Approved by: markj (mentor) Relnotes: yes Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D47618
* RegenEdward Tomasz Napierala2024-11-291-0/+1
|
* sysent: regen with refactored codeBrooks Davis2024-10-301-0/+6
| | | | | | | All changes are no-ops and are one of: - Name changes of obsolete system calls in comments - Correct prefixes on unimplemented freebsd32 system calls - Currently unused macros for FreeBSD 14 compatablity
* sysent: regen removing comment alignmentBrooks Davis2024-10-011-102/+102
|
* RegenKonstantin Belousov2024-09-271-0/+1
|
* sysent: regen after d0675399Mariusz Zaborski2024-08-271-1/+1
|
* RegenMariusz Zaborski2024-05-211-1/+1
|
* syscalls: regenMariusz Zaborski2024-05-131-1/+1
| | | | Pointed out by: trasz
* regenKonstantin Belousov2024-01-241-0/+1
|
* Remove never implemented sbrk and sstk syscallsBrooks Davis2023-12-041-2/+2
| | | | | | | | | | | | | Both system calls were stubs returning EOPNOTSUPP and libc did not provide _ or __sys_ prefixed symbols. The actual implementation of sbrk(2) is on top of the undocumented break(2) system call. Technically this is a change in ABI, but no non-contrived program ever called these syscalls. Reviewed by: kib, emaste Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D42872
* timerfd: Move implementation from linux compat to sys/kernJake Freeland2023-08-241-0/+3
| | | | | | | | | | | 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
* RegenKonstantin Belousov2023-08-231-0/+1
|
* Regenerate sysent stuff after $FreeBSD$ removalWarner Losh2023-06-091-1/+0
| | | | Sponsored by: Netflix
* syscalls: regenerateWarner Losh2023-04-211-1/+1
| | | | | | | The 4.2 sigreturn was a bit of a enima so the 4.2 was remove. Regenerate to cope the very minor changes in comments and one string. Sponsored by: Netflix
* RegenKonstantin Belousov2023-04-041-1/+1
|
* RegenKonstantin Belousov2023-03-271-0/+1
|
* sysent: regen after 52a1d90c8bfe, posix_fadvise in capmodeEd Maste2022-04-141-1/+1
|
* sysent: regen for syscallarg_tBrooks Davis2022-03-281-1/+1
|
* Revert "syscallarg_t: Add a type for system call arguments"Brooks Davis2022-01-121-1/+1
| | | | | | | | Missed issues in truss on at least armv7 and powerpcspe need to be resolved before recommit. This reverts commit 3889fb8af0b611e3126dc250ebffb01805152104. This reverts commit 1544e0f5d1f1e3b8c10a64cb899a936976ca7ea4.
* sysent: regen for syscallarg_tBrooks Davis2022-01-121-1/+1
|
* RegenKonstantin Belousov2021-12-091-1/+8
|
* syscalls: regenBrooks Davis2021-11-291-1/+1
|
* syscalls: regenBrooks Davis2021-11-291-2/+2
|
* syscalls: regenBrooks Davis2021-11-291-2/+2
|
* syscalls: regenBrooks Davis2021-11-221-1/+1
|
* RegenKonstantin Belousov2021-11-101-0/+1
|
* Regen after 0dc332bff200Ka Ho Ng2021-08-051-0/+1
|
* RegenKonstantin Belousov2021-07-281-2/+2
|
* regen syscall files after d51198d63b63Ed Maste2021-05-131-7/+7
|
* Reserve gaps in syscall numbers for local useBrooks Davis2021-01-261-60/+60
| | | | | | | | | | | It is best for auditing of syscalls.master if we only append to the file. Reserving unimplemented system call numbers for local use makes this policy and provides a large set of syscall numbers FreeBSD derivatives can use without risk of conflict. Reviewed by: jhb, kevans, kib Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D27988
* Remove documentation of unimplemented syscallsBrooks Davis2021-01-261-15/+15
| | | | | | | | | | | | We have not been able to run binaries from other BSDs well over a decade. There is no need to document their allocation decisions here. We also don't need to reserve syscall numbers of never-implemented syscalls. Reviewed by: jhb, kib Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D27988
* Regenerate syscall files after reallocation of aio_writev/aio_readvAlan Somers2021-01-081-2/+4
|
* Regenerate syscall files after addition of aio_writev/aio_readvAlan Somers2021-01-031-2/+2
|
* Regen.Konstantin Belousov2020-12-271-0/+1
|
* Regen after r366145.Edward Tomasz Napierala2020-09-251-591/+591
| | | | | | | Sponsored by: DARPA Notes: svn path=/head/; revision=366147
* Regenerate.Mark Johnston2020-07-061-2/+2
| | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=362971
* Update the files created from the new syscalls.master from r361599.Rick Macklem2020-05-281-0/+1
| | | | | | | | Reviewed by: brooks Differential Revision: https://reviews.freebsd.org/D24949 Notes: svn path=/head/; revision=361602
* sysent: re-roll after 360236 (AUE_CLOSERANGE used)Kyle Evans2020-04-241-1/+1
| | | | Notes: svn path=/head/; revision=360237
* sysent: re-roll after r359930Kyle Evans2020-04-141-1/+1
| | | | Notes: svn path=/head/; revision=359931
* sysent: re-roll after introduction of close_range in r359836Kyle Evans2020-04-121-0/+1
| | | | Notes: svn path=/head/; revision=359837
* make sysent for r358172 ("vfs: add realpathat syscall")Mateusz Guzik2020-02-201-0/+1
| | | | Notes: svn path=/head/; revision=358173
* regen sysent after r357831, r357838Ed Maste2020-02-121-2/+2
| | | | | | | | | Capability mode changes allowing fdatasync and getloginclass. Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=357839
* Regen.Konstantin Belousov2020-02-091-0/+1
| | | | Notes: svn path=/head/; revision=357694
* Jail and capability mode for shm_rename; add audit support for shm_renameDavid Bright2019-11-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | Co-mingling two things here: * Addressing some feedback from Konstantin and Kyle re: jail, capability mode, and a few other things * Adding audit support as promised. The audit support change includes a partial refresh of OpenBSM from upstream, where the change to add shm_rename has already been accepted. Matthew doesn't plan to work on refreshing anything else to support audit for those new event types. Submitted by: Matthew Bryan <matthew.bryan@isilon.com> Reviewed by: kib Relnotes: Yes Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D22083 Notes: svn path=/head/; revision=354808
* sysent: regenerate after r352747.David Bright2019-09-261-0/+1
| | | | | | | Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=352751
* sysent: regenerate after r352705Kyle Evans2019-09-251-1/+7
| | | | | | | | This also implements it, fixes kdump, and removes no longer needed bits from lib/libc/sys/shm_open.c for the interim. Notes: svn path=/head/; revision=352706