|
Revision tags: release/13.4.0-p5, release/13.5.0-p1, release/14.2.0-p3, release/13.5.0, release/14.2.0-p2, release/14.1.0-p8, release/13.4.0-p4, release/14.1.0-p7, release/14.2.0-p1, release/13.4.0-p3, release/14.2.0, release/13.4.0, release/14.1.0, release/13.3.0 |
|
| #
e77813f7 |
| 11-Dec-2023 |
Mariusz Zaborski <[email protected]> |
capsicum: introduce cap_rights_is_empty Function
Before this commit, we only had the capability to check if a specific capability was set (using cap_rights_is_set function). However, there was no ef
capsicum: introduce cap_rights_is_empty Function
Before this commit, we only had the capability to check if a specific capability was set (using cap_rights_is_set function). However, there was no efficient method to determine if a cap_rights_t structure doesn't contain any capability. The cap_rights_is_empty function addresses this gap.
PR: 275330 Reported by: [email protected] Reviewed by: emaste, markj Differential Revision: https://reviews.freebsd.org/D42780
(cherry picked from commit a7100ae23aca07976926bd8d50223c45149f65d6)
show more ...
|
| #
39664f1b |
| 08-Apr-2024 |
Jake Freeland <[email protected]> |
capsicum.h: Include ktrace.h only in kernel
Fix cross build failure by including ktrace.h only when _KERNEL is defined.
Fixes: 9bec84131215 Approved by: markj (mentor) MFC after: 1 month Sponsored
capsicum.h: Include ktrace.h only in kernel
Fix cross build failure by including ktrace.h only when _KERNEL is defined.
Fixes: 9bec84131215 Approved by: markj (mentor) MFC after: 1 month Sponsored by: The FreeBSD Foundation
(cherry picked from commit 34791f4ac79ee41f6986178a3a89d13f37ac156c)
show more ...
|
| #
9da71e63 |
| 06-Apr-2024 |
Jake Freeland <[email protected]> |
ktrace: Record detailed ECAPMODE violations
When a Capsicum violation occurs in the kernel, ktrace will now record detailed information pertaining to the violation.
For example: - When a namei look
ktrace: Record detailed ECAPMODE violations
When a Capsicum violation occurs in the kernel, ktrace will now record detailed information pertaining to the violation.
For example: - When a namei lookup violation occurs, ktrace will record the path. - When a signal violation occurs, ktrace will record the signal number. - When a sendto(2) violation occurs, ktrace will record the recipient sockaddr.
For all violations, the syscall and ABI is recorded.
kdump is also modified to display this new information to the user.
Reviewed by: oshogbo, markj Approved by: markj (mentor) MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D40676
(cherry picked from commit 9bec84131215ed554f435e208399f36e982246f1)
show more ...
|
|
Revision tags: release/14.0.0 |
|
| #
95ee2897 |
| 16-Aug-2023 |
Warner Losh <[email protected]> |
sys: Remove $FreeBSD$: two-line .h pattern
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
|
| #
4d846d26 |
| 10-May-2023 |
Warner Losh <[email protected]> |
spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of
spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
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
show more ...
|
|
Revision tags: release/13.2.0, release/12.4.0, release/13.1.0, release/12.3.0, release/13.0.0, release/12.2.0 |
|
| #
fe4f4914 |
| 01-Aug-2020 |
Mateusz Guzik <[email protected]> |
capsicum: move global caps to caprights.h
.. for easier inclusion
|
|
Revision tags: release/11.4.0 |
|
| #
b7e3a3b6 |
| 26-Mar-2020 |
Mark Johnston <[email protected]> |
Remove unused SYSINIT macros for capability rights.
Static rights are initialized in cap_rights_sysinit().
MFC after: 1 week
|
| #
fad58734 |
| 15-Feb-2020 |
Mateusz Guzik <[email protected]> |
capsicum: add cap_rights_init_zero, cap_rights_init_one, cap_rights_set_one
... which allow the compiler to generate relevant code in place without resorting to calling to a routine at runtime.
|
| #
0f5f49ef |
| 14-Feb-2020 |
Kyle Evans <[email protected]> |
u_char -> vm_prot_t in a couple of places, NFC
The latter is a typedef of the former; the typedef exists and these bits are representing vmprot values, so use the correct type.
Submitted by: sigsys
u_char -> vm_prot_t in a couple of places, NFC
The latter is a typedef of the former; the typedef exists and these bits are representing vmprot values, so use the correct type.
Submitted by: [email protected] MFC after: 3 days
show more ...
|
| #
1b853b62 |
| 11-Feb-2020 |
Mateusz Guzik <[email protected]> |
capsicum: restore the cap_rights_contains symbol
It is expected to be provided by libc.
PR: 244033 Reported by: Jan Kokemueller
|
| #
e10f063b |
| 03-Feb-2020 |
Mateusz Guzik <[email protected]> |
fd: streamline fget_unlocked
clang has the unfortunate property of paying little attention to prediction hints when faced with a loop spanning the majority of the rotuine.
In particular fget_unlock
fd: streamline fget_unlocked
clang has the unfortunate property of paying little attention to prediction hints when faced with a loop spanning the majority of the rotuine.
In particular fget_unlocked has an unlikely corner case where it starts almost from scratch. Faced with this clang generates a maze of taken jumps, whereas gcc produces jump-free code (in the expected case).
Work around the problem by providing a variant which only tries once and resorts to calling the original code if anything goes wrong.
While here note that the 'seq' parameter is almost never passed, thus the seldom users are redirected to call it directly.
show more ...
|
| #
bcd1cf4f |
| 03-Feb-2020 |
Mateusz Guzik <[email protected]> |
capsicum: faster cap_rights_contains
Instead of doing a 2 iteration loop (determined at runeimt), take advantage of the fact that the size is already known.
While here provdie cap_check_inline so t
capsicum: faster cap_rights_contains
Instead of doing a 2 iteration loop (determined at runeimt), take advantage of the fact that the size is already known.
While here provdie cap_check_inline so that fget_unlocked does not have to do a function call.
Verified with the capsicum suite /usr/tests.
show more ...
|
|
Revision tags: release/12.1.0, release/11.3.0 |
|
| #
1ece6232 |
| 28-Feb-2019 |
Enji Cooper <[email protected]> |
Remove references to pdwait4(2) and `CAP_PDWAIT` from rights(4)
@cem removed references to pdwait4(2) (a nonexistent syscall) in r320058.
This change removes references to pdwait4(2) and `CAP_PDWAI
Remove references to pdwait4(2) and `CAP_PDWAIT` from rights(4)
@cem removed references to pdwait4(2) (a nonexistent syscall) in r320058.
This change removes references to pdwait4(2) and `CAP_PDWAIT` in rights(4) to not mislead the user into thinking that pdwait4(2)/`CAP_PDWAIT` is actually implemented in the stock FreeBSD kernel.
The goal of this functionality was to simplify monitoring/manipulating processes started with `pdfork`, et al, and avoid races with waiting on pids. The syscall was never completed though--just discussed on the capsicum mailing list back in 2015: https://lists.cam.ac.uk/pipermail/cl-capsicum-discuss/2015-May/msg00012.html . That being said, there are members of the project (@rwatson, etc) who have longterm goals to implement this syscall to better secure pdfork(2) calls.
PR: 235871 Reviewed by: emaste Discussed with: rwatson Approved by: emaste (mentor) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D18950
show more ...
|
|
Revision tags: release/12.0.0 |
|
| #
98fca94d |
| 12-Oct-2018 |
Mateusz Guzik <[email protected]> |
capsicum: provide cap_rights_fde_inline
Reading caps is in the hot path (on each successful fd lookup), but completely unnecessarily requires a function call.
Approved by: re (gjb) Sponsored by: Th
capsicum: provide cap_rights_fde_inline
Reading caps is in the hot path (on each successful fd lookup), but completely unnecessarily requires a function call.
Approved by: re (gjb) Sponsored by: The FreeBSD Foundation
show more ...
|
|
Revision tags: release/11.2.0 |
|
| #
8a656309 |
| 23-May-2018 |
Matt Macy <[email protected]> |
kern_sendit: use pre-initialized rights
|
| #
71189909 |
| 20-May-2018 |
Matt Macy <[email protected]> |
Add additional preinitialized cap_rights
|
| #
acbde298 |
| 19-May-2018 |
Matt Macy <[email protected]> |
capsicum: propagate const correctness
|
| #
cbd92ce6 |
| 09-May-2018 |
Matt Macy <[email protected]> |
Eliminate the overhead of gratuitous repeated reinitialization of cap_rights
- Add macros to allow preinitialization of cap_rights_t.
- Convert most commonly used code paths to use preinitialized c
Eliminate the overhead of gratuitous repeated reinitialization of cap_rights
- Add macros to allow preinitialization of cap_rights_t.
- Convert most commonly used code paths to use preinitialized cap_rights_t. A 3.6% speedup in fstat was measured with this change.
Reported by: mjg Reviewed by: oshogbo Approved by: sbruno MFC after: 1 month
show more ...
|
| #
75e9b455 |
| 07-May-2018 |
Mateusz Guzik <[email protected]> |
Change trap_enotcap to bool and annotate with __read_frequently
It is read on each return to user space.
|
| #
9b10f59a |
| 13-Dec-2017 |
Pedro F. Giffuni <[email protected]> |
SPDX: mostly fixes to previous changes.
Introduce the recently approved BSD-1-Clause and replace 0BSD which never did fit well our use cases.
|
|
Revision tags: release/10.4.0, release/11.1.0, release/11.0.1, release/11.0.0 |
|
| #
643f6f47 |
| 21-Sep-2016 |
Konstantin Belousov <[email protected]> |
Add PROC_TRAPCAP procctl(2) controls and global sysctl kern.trap_enocap.
Both can be used to cause processes in capability mode to receive SIGTRAP when ENOTCAPABLE or ECAPMODE errors are returned fr
Add PROC_TRAPCAP procctl(2) controls and global sysctl kern.trap_enocap.
Both can be used to cause processes in capability mode to receive SIGTRAP when ENOTCAPABLE or ECAPMODE errors are returned from syscalls.
Idea by: emaste Reviewed by: oshogbo (previous version), emaste Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D7965
show more ...
|
|
Revision tags: release/10.3.0 |
|
| #
bc1ace0b |
| 27-Aug-2015 |
Ed Schouten <[email protected]> |
Decompose linkat()/renameat() rights to source and target.
To make it easier to understand how Capsicum interacts with linkat() and renameat(), rename the rights to CAP_{LINK,RENAME}AT_{SOURCE,TARGE
Decompose linkat()/renameat() rights to source and target.
To make it easier to understand how Capsicum interacts with linkat() and renameat(), rename the rights to CAP_{LINK,RENAME}AT_{SOURCE,TARGET}.
This also addresses a shortcoming in Capsicum, where it isn't possible to disable linking to files stored in a directory. Creating hardlinks essentially makes it possible to access files with additional rights.
Reviewed by: rwatson, wblock Differential Revision: https://reviews.freebsd.org/D3411
show more ...
|
|
Revision tags: release/10.2.0 |
|
| #
cf6b9e9b |
| 23-Jul-2015 |
Ed Schouten <[email protected]> |
Allow cap_rights_{set,clear,is_set} to be called with no arguments.
In the CloudABI code I sometimes call into cap_rights_* without providing any arguments. Though one could argue that this doesn't
Allow cap_rights_{set,clear,is_set} to be called with no arguments.
In the CloudABI code I sometimes call into cap_rights_* without providing any arguments. Though one could argue that this doesn't make sense, in this specific case it's hard to avoid, as the rights that should be tested against are forwarded by a couple of wrapper macros.
show more ...
|
| #
d2925ccc |
| 16-Mar-2015 |
Robert Watson <[email protected]> |
Introduce a cap_ioctl_t used for the 'cmds' arguments to cap_ioctls_limit() and cap_ioctls_get(). On FreeBSD, these are 'unsigned long', but on Linux, ioctl(2) takes an 'int', making mild abstractio
Introduce a cap_ioctl_t used for the 'cmds' arguments to cap_ioctls_limit() and cap_ioctls_get(). On FreeBSD, these are 'unsigned long', but on Linux, ioctl(2) takes an 'int', making mild abstraction desirable.
MFC after: 3 days Sponsored by: Google, Inc.
show more ...
|
| #
2205e0d1 |
| 23-Jan-2015 |
Jilles Tjoelker <[email protected]> |
Add futimens and utimensat system calls.
The core kernel part is patch file utimes.2008.4.diff from [email protected]. I updated the code for API changes, added the manual page and added compatibi
Add futimens and utimensat system calls.
The core kernel part is patch file utimes.2008.4.diff from [email protected]. I updated the code for API changes, added the manual page and added compatibility code for old kernels. There is also audit and Capsicum support.
A new UTIME_* constant might allow setting birthtimes in future.
Differential Revision: https://reviews.freebsd.org/D1426 Submitted by: pluknet (partially) Reviewed by: delphij, pluknet, rwatson Relnotes: yes
show more ...
|