]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
ktrace: Record detailed ECAPMODE violations
authorJake Freeland <jfree@FreeBSD.org>
Sat, 6 Apr 2024 18:29:45 +0000 (13:29 -0500)
committerJake Freeland <jfree@FreeBSD.org>
Sun, 7 Apr 2024 23:52:51 +0000 (18:52 -0500)
commit9bec84131215ed554f435e208399f36e982246f1
tree01f924a88a04bb1d5ecf9dc6239f31460a15a8ae
parent401c0f8aa1ce5f15eaa546df1b44fd68c0f11928
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
sys/kern/kern_ktrace.c
sys/kern/sys_capability.c
sys/sys/capsicum.h
sys/sys/ktrace.h
usr.bin/kdump/kdump.c