History log of /freebsd/sys/kern/sys_capability.c (Results 1 – 25 of 108)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 8ae9921f 22-Oct-2024 Brooks Davis <brooks@FreeBSD.org>

sys_capability.c: update the source of CAPENABLED

System calls allowed in capability mode have been specified by the
CAPENABLED flag in syscalls.master since 2021.


Revision tags: release/13.4.0, release/14.1.0, release/13.3.0
# 61e3e177 22-Jan-2024 Pawel Jakub Dawidek <pjd@FreeBSD.org>

capsicum: SIGTRAP is delivered also on ECAPMODE error.

Approved by: oshogbo (mentor)


# 9bec8413 06-Apr-2024 Jake Freeland <jfree@FreeBSD.org>

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

show more ...


Revision tags: release/14.0.0
# 685dc743 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

sys: Remove $FreeBSD$: one-line .c pattern

Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/


# 4d846d26 10-May-2023 Warner Losh <imp@FreeBSD.org>

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
# f17ef286 22-Feb-2022 Mateusz Guzik <mjg@FreeBSD.org>

fd: rename fget*_locked to fget*_noref

This gets rid of the error prone naming where fget_unlocked returns with
a ref held, while fget_locked requires a lock but provides nothing in
terms of making

fd: rename fget*_locked to fget*_noref

This gets rid of the error prone naming where fget_unlocked returns with
a ref held, while fget_locked requires a lock but provides nothing in
terms of making sure the file lives past unlock.

No functional changes.

show more ...


Revision tags: release/12.3.0, release/13.0.0, release/12.2.0, release/11.4.0
# 2d896b81 19-Mar-2020 Mark Johnston <markj@FreeBSD.org>

Enter a write sequence when updating rights.

The Capsicum system calls modify file descriptor table entries. To
ensure that readers observe a consistent snapshot of descriptor writes,
the system ca

Enter a write sequence when updating rights.

The Capsicum system calls modify file descriptor table entries. To
ensure that readers observe a consistent snapshot of descriptor writes,
the system calls need to signal to unlocked readers that an update is
pending.

Note that ioctl rights are always checked with the descriptor table lock
held, so it is not strictly necessary to signal unlocked readers.
However, we probably want to enable lockless ioctl checks eventually, so
use seqc_write_begin() in kern_cap_ioctls_limit() too.

Reviewed by: kib
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D24119

show more ...


# dca7f66f 15-Feb-2020 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r357931 through r357965.


# eb40664d 15-Feb-2020 Mateusz Guzik <mjg@FreeBSD.org>

capsicum: use new helpers


# 74dc6beb 14-Feb-2020 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r357855 through r357920.


# 0f5f49ef 14-Feb-2020 Kyle Evans <kevans@FreeBSD.org>

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: sigsys@gmail.com
MFC after: 3 days

show more ...


# bc02c18c 07-Feb-2020 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r357408 through r357661.


# bcd1cf4f 03-Feb-2020 Mateusz Guzik <mjg@FreeBSD.org>

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
# 67350cb5 09-Dec-2018 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r340918 through r341763.


Revision tags: release/12.0.0
# afde86eb 06-Dec-2018 Mark Johnston <markj@FreeBSD.org>

Let kern.trap_enotcap be set as a tunable.

This is handy for testing programs that are run by rc.

MFC after: 1 week
Sponsored by: The FreeBSD Foundation


# c6879c6c 23-Oct-2018 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r339015 through r339669.


# 98fca94d 13-Oct-2018 Mateusz Guzik <mjg@FreeBSD.org>

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
# acbde298 19-May-2018 Matt Macy <mmacy@FreeBSD.org>

capsicum: propagate const correctness


# 75e9b455 08-May-2018 Mateusz Guzik <mjg@FreeBSD.org>

Change trap_enotcap to bool and annotate with __read_frequently

It is read on each return to user space.


# 965cd211 18-Feb-2018 Mariusz Zaborski <oshogbo@FreeBSD.org>

Fix broken assertion in r329520.

Reported by: pho@ lwhsu@


# 20641651 18-Feb-2018 Mariusz Zaborski <oshogbo@FreeBSD.org>

Use the fdeget_locked function instead of the fget_locked in the
sys_capability.

Reviewed by: pjd@ (earlier version)
Discussed with: mjg@


# 8a36da99 27-Nov-2017 Pedro F. Giffuni <pfg@FreeBSD.org>

sys/kern: adoption of SPDX licensing ID tags.

Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error
prone

sys/kern: adoption of SPDX licensing ID tags.

Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error
prone - task.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

show more ...


Revision tags: release/10.4.0, release/11.1.0
# 5763f796 21-Oct-2016 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r307383 through r307735.


# 4b83a776 21-Oct-2016 Mariusz Zaborski <oshogbo@FreeBSD.org>

capsicum: perform copyout without the fildesc lock held in sys_cap_ioctls_get

Reviewed by: pjd


Revision tags: release/11.0.1
# 8c4282b3 24-Sep-2016 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r305892 through r306302.


12345