#
fdafd315 |
| 24-Nov-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Automated cleanup of cdefs and other formatting
Apply the following automated changes to try to eliminate no-longer-needed sys/cdefs.h includes as well as now-empty blank lines in a row.
Remov
sys: Automated cleanup of cdefs and other formatting
Apply the following automated changes to try to eliminate no-longer-needed sys/cdefs.h includes as well as now-empty blank lines in a row.
Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/ Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/ Remove /\n+#if.*\n#endif.*\n+/ Remove /^#if.*\n#endif.*\n/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/
Sponsored by: Netflix
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/
|
Revision tags: release/13.2.0, release/12.4.0, release/13.1.0, release/12.3.0 |
|
#
0dc332bf |
| 05-Aug-2021 |
Ka Ho Ng <khng@FreeBSD.org> |
Add fspacectl(2), vn_deallocate(9) and VOP_DEALLOCATE(9).
fspacectl(2) is a system call to provide space management support to userspace applications. VOP_DEALLOCATE(9) is a VOP call to perform the
Add fspacectl(2), vn_deallocate(9) and VOP_DEALLOCATE(9).
fspacectl(2) is a system call to provide space management support to userspace applications. VOP_DEALLOCATE(9) is a VOP call to perform the deallocation. vn_deallocate(9) is a public KPI for kmods' use.
The purpose of proposing a new system call, a KPI and a VOP call is to allow bhyve or other hypervisor monitors to emulate the behavior of SCSI UNMAP/NVMe DEALLOCATE on a plain file.
fspacectl(2) comprises of cmd and flags parameters to specify the space management operation to be performed. Currently cmd has to be SPACECTL_DEALLOC, and flags has to be 0.
fo_fspacectl is added to fileops. VOP_DEALLOCATE(9) is added as a new VOP call. A trivial implementation of VOP_DEALLOCATE(9) is provided.
Sponsored by: The FreeBSD Foundation Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D28347
show more ...
|
Revision tags: release/13.0.0 |
|
#
fa323503 |
| 23-Feb-2021 |
Alex Richardson <arichardson@FreeBSD.org> |
close_range: add audit support
This fixes the closefrom test in sys/audit.
Includes cherry-picks of the following commits from openbsm:
https://github.com/openbsm/openbsm/commit/4dfc628aafe589d688
close_range: add audit support
This fixes the closefrom test in sys/audit.
Includes cherry-picks of the following commits from openbsm:
https://github.com/openbsm/openbsm/commit/4dfc628aafe589d68848f7033f3d3488c4d979e0 https://github.com/openbsm/openbsm/commit/99ff6fe32aebc5a4b8d40d60062b8574697df557 https://github.com/openbsm/openbsm/commit/da48a0399e95448693d3fa2be48454ca564c1be8
Reviewed By: kevans Differential Revision: https://reviews.freebsd.org/D28388
show more ...
|
Revision tags: release/12.2.0 |
|
#
e5ecee74 |
| 01-Sep-2020 |
Mateusz Guzik <mjg@FreeBSD.org> |
security: clean up empty lines in .c and .h files
|
Revision tags: release/11.4.0 |
|
#
757a5642 |
| 16-May-2020 |
Christian S.J. Peron <csjp@FreeBSD.org> |
Add BSM record conversion for a number of syscalls:
- thr_kill(2) and thr_exit(2) generally (no argument auditing here. - A set of syscalls for the process descriptor family, specifically: pdfork(
Add BSM record conversion for a number of syscalls:
- thr_kill(2) and thr_exit(2) generally (no argument auditing here. - A set of syscalls for the process descriptor family, specifically: pdfork(2), pdgetpid(2) and pdkill(2)
For these syscalls, audit the file descriptor. In the case of pdfork(2) a pointer to an integer (file descriptor) is passed in as an argument. We audit the post initialized file descriptor (not the random garbage that would have been passed in). We will also audit the child process which was created from the fork operation (similar to what is done for the fork(2) syscall).
pdkill(2) we audit the signal value and fd, and finally pdgetpid(2) just the file descriptor:
- Following is a sample of the produced audit trails:
header,111,11,pdfork(2),0,Sat May 16 03:07:50 2020, + 394 msec argument,0,0x39d,child PID argument,2,0x2,flags argument,1,0x8,fd subject,root,root,0,root,0,924,0,0,0.0.0.0 return,success,925
header,79,11,pdgetpid(2),0,Sat May 16 03:07:50 2020, + 394 msec argument,1,0x8,fd subject,root,root,0,root,0,924,0,0,0.0.0.0 return,success,0 trailer,79
header,135,11,pdkill(2),0,Sat May 16 03:07:50 2020, + 395 msec argument,1,0x8,fd argument,2,0xf,signal process_ex,root,root,0,root,0,925,0,0,0.0.0.0 subject,root,root,0,root,0,924,0,0,0.0.0.0 return,success,0 trailer,135
MFC after: 1 week
show more ...
|
#
b1c17068 |
| 30-Mar-2020 |
Christian S.J. Peron <csjp@FreeBSD.org> |
Make sure we convert internal audit records for thr_new into BSM records.
MFC after: 2 weeks
|
#
e43d33d2 |
| 05-Mar-2020 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r358466 through r358677.
|
#
3580f3cf |
| 03-Mar-2020 |
Christian S.J. Peron <csjp@FreeBSD.org> |
In r358471, we interrupted the case block that would eventually lead to the path related tokens not being processed. Restore this behavior and and move AUE_JAIL_SET in this block, as it may condition
In r358471, we interrupted the case block that would eventually lead to the path related tokens not being processed. Restore this behavior and and move AUE_JAIL_SET in this block, as it may conditionally contain a path token.
Discovered by: kevans PR: 244537 Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D23929
show more ...
|
#
1018b2ff |
| 29-Feb-2020 |
Christian S.J. Peron <csjp@FreeBSD.org> |
Currently kernel audit events for jail_set(2), jail_get(2), jail_attach(2), jail_remove(2) and finally setloginclass(2) are not being converted and committed into userspace. Add the cases for these s
Currently kernel audit events for jail_set(2), jail_get(2), jail_attach(2), jail_remove(2) and finally setloginclass(2) are not being converted and committed into userspace. Add the cases for these syscalls and make sure they are being converted properly.
Reviewed by: bz, kevans MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D23882
show more ...
|
#
6c140a72 |
| 20-Feb-2020 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r358131 through r358178.
|
#
0573d0a9 |
| 20-Feb-2020 |
Mateusz Guzik <mjg@FreeBSD.org> |
vfs: add realpathat syscall
realpath(3) is used a lot e.g., by clang and is a major source of getcwd and fstatat calls. This can be done more efficiently in the kernel.
This works by performing a r
vfs: add realpathat syscall
realpath(3) is used a lot e.g., by clang and is a major source of getcwd and fstatat calls. This can be done more efficiently in the kernel.
This works by performing a regular lookup while saving the name and found parent directory. If the terminal vnode is a directory we can resolve it using usual means. Otherwise we can use the name saved by lookup and resolve the parent.
See the review for sample syscall counts.
Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D23574
show more ...
|
#
2d5603fe |
| 18-Nov-2019 |
David Bright <dab@FreeBSD.org> |
Jail and capability mode for shm_rename; add audit support for shm_rename
Co-mingling two things here:
* Addressing some feedback from Konstantin and Kyle re: jail, capability mode, and a few
Jail and capability mode for shm_rename; add audit support for shm_rename
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
show more ...
|
Revision tags: release/12.1.0, release/11.3.0, release/12.0.0 |
|
#
12395dc9 |
| 22-Jul-2018 |
Alan Somers <asomers@FreeBSD.org> |
Fix audit of chflagsat, lgetfh, and setfib
These syscalls were always supposed to have been auditted, but due to oversights never were.
PR: 228374 Reported by: aniketp Reviewed by: aniketp MFC aft
Fix audit of chflagsat, lgetfh, and setfib
These syscalls were always supposed to have been auditted, but due to oversights never were.
PR: 228374 Reported by: aniketp Reviewed by: aniketp MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D16388
show more ...
|
Revision tags: release/11.2.0 |
|
#
cb3d7cd8 |
| 28-May-2018 |
Alan Somers <asomers@FreeBSD.org> |
Fix "Bad tailq" panic when auditing auditon(A_SETCLASS, ...)
Due to an oversight in r195280, auditon(A_SETCLASS, ...) would cause a tailq element to get added to the tailq twice, resulting in a circ
Fix "Bad tailq" panic when auditing auditon(A_SETCLASS, ...)
Due to an oversight in r195280, auditon(A_SETCLASS, ...) would cause a tailq element to get added to the tailq twice, resulting in a circular tailq. This panics when INVARIANTS are on.
MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D15381
show more ...
|
#
82725ba9 |
| 23-Nov-2017 |
Hans Petter Selasky <hselasky@FreeBSD.org> |
Merge ^/head r325999 through r326131.
|
#
51369649 |
| 20-Nov-2017 |
Pedro F. Giffuni <pfg@FreeBSD.org> |
sys: further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 3-Clause license.
The Software Package Data Exchange (SPDX) group provides a specification to make it easier for
sys: further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 3-Clause license.
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.
Special thanks to Wind River for providing access to "The Duke of Highlander" tool: an older (2014) run over FreeBSD tree was useful as a starting point.
show more ...
|
Revision tags: release/10.4.0, release/11.1.0 |
|
#
b65ec5e5 |
| 30-Mar-2017 |
Robert Watson <rwatson@FreeBSD.org> |
Various BSM generation improvements when auditing AUE_ACCEPT, AUE_PROCCTL, AUE_SENDFILE, AUE_ACL_*, and AUE_POSIX_FALLOCATE. Audit AUE_SHMUNLINK path in the path token rather than as a text string, a
Various BSM generation improvements when auditing AUE_ACCEPT, AUE_PROCCTL, AUE_SENDFILE, AUE_ACL_*, and AUE_POSIX_FALLOCATE. Audit AUE_SHMUNLINK path in the path token rather than as a text string, and AUE_SHMOPEN flags as an integer token rather than a System V IPC address token.
Obtained from: TrustedBSD Project MFC after: 3 weeks Sponsored by: DARPA, AFRL
show more ...
|
#
759c8caa |
| 27-Mar-2017 |
Robert Watson <rwatson@FreeBSD.org> |
Introduce an audit event identifier -> audit event name mapping database in the kernel audit implementation, similar the exist class mapping database. This will be used by the DTrace audit provider
Introduce an audit event identifier -> audit event name mapping database in the kernel audit implementation, similar the exist class mapping database. This will be used by the DTrace audit provider to map audit event identifiers originating in the system-call table back into strings for the purposes of setting probe names. The database is initialised and maintained by auditd(8), which reads values in from the audit_events configuration file, and then manages them using the A_GETEVENT and A_SETEVENT auditon(2) operations.
Obtained from: TrustedBSD Project Sponsored by: DARPA, AFRL MFC after: 3 weeks
show more ...
|
#
0ed76ec8 |
| 24-Nov-2016 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r308870 through r309105.
|
#
1279fdaf |
| 22-Nov-2016 |
Robert Watson <rwatson@FreeBSD.org> |
Audit 'fd' and 'cmd' arguments to fcntl(2), and when generating BSM, always audit the file-descriptor number and vnode information for all fnctl(2) commands, not just locking-related ones. This was
Audit 'fd' and 'cmd' arguments to fcntl(2), and when generating BSM, always audit the file-descriptor number and vnode information for all fnctl(2) commands, not just locking-related ones. This was likely an oversight in the original adaptation of this code from XNU.
MFC after: 3 days Sponsored by: DARPA, AFRL
show more ...
|
Revision tags: release/11.0.1, release/11.0.0 |
|
#
ed04e0c3 |
| 25-Aug-2016 |
Enji Cooper <ngie@FreeBSD.org> |
MFhead @ r304815
|
#
7d0ce7aa |
| 23-Aug-2016 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r304537 through r304699.
|
#
70a98c11 |
| 20-Aug-2016 |
Robert Watson <rwatson@FreeBSD.org> |
Audit the accepted (or rejected) username argument to setlogin(2).
(NB: This was likely a mismerge from XNU in audit support, where the text argument to setlogin(2) is captured -- but as a text toke
Audit the accepted (or rejected) username argument to setlogin(2).
(NB: This was likely a mismerge from XNU in audit support, where the text argument to setlogin(2) is captured -- but as a text token, whereas this change uses the dedicated login-name field in struct audit_record.)
MFC after: 2 weeks Sponsored by: DARPA, AFRL
show more ...
|
#
98daa3e5 |
| 11-Jul-2016 |
Robert Watson <rwatson@FreeBSD.org> |
Add AUE_WAIT6 handling to the BSM conversion switch statement, reusing the BSM encoding used for AUE_WAIT4.
MFC after: 3 days Sponsored by: DARPA, AFRL
|