Differences between revisions 46 and 47
Revision 46 as of 2025-02-04T20:50:20+0000
Size: 3221
Editor: EdMaste
Comment: lsof not completely done, see its Configure script
Revision 47 as of 2025-02-04T20:51:09+0000
Size: 3211
Editor: EdMaste
Comment: Fix markup
Deletions are marked like this. Additions are marked like this.
Line 2: Line 2:
'''DONE'''

(Partially done)
Build kernel hooks so that the lsof port doesn't need to grovel in kvm and isn't tied to a specific kernel build.
'''PARTIALLY DONE''' Build kernel hooks so that the lsof port doesn't need to grovel in kvm and isn't tied to a specific kernel build.

lsof port

PARTIALLY DONE Build kernel hooks so that the lsof port doesn't need to grovel in kvm and isn't tied to a specific kernel build.

Serial console and polled I/O

When using a serial console, kernel printfs end up calling into a polled I/O path, potentially stalling kernel operations until the output is finished being transmitted. This is a particular problem at 9600 baud. (Examples of kernel printfs include link state messages, aac(4) COMMAND TIMEOUT messages, etc.) Polled I/O is probably still needed for the debugger, panic handling, etc.

Printf() ends up invoking cnputc(), which calls siocnputc() in the default 6.x serial console case and uart_cnputc() in the default 8.x serial console case. These functions spin while waiting for the tx register to be ready.

(reqst00227383)

  • Apparently jhb@ has been discussing approaches here
  • Attilio has done related work in the past, related to messages output during boot

printf
tprintf
uprintf
log

sysctl kern.consmsgbuf_size
sysctl kern.msgbuf
sysctl kern.msgbuf_clear
sysctl security.bsd.unprivileged_read_msgbuf

/dev/klog

Debugging

Kernel core enhancements

Be able to extract the following from a core:

  • hostname
  • hash (sha-1 etc.) of kern.bootfile to positively identify the kernel binary that was running
  • uptime
  • current time of day

reqst00277326 [debug] Include kernel ident data at panic time reqst00193848 Add softclock backlog text to sw watchdog panic to aid in debugging

Serial debugger use with conserver

A remote serial debugging session can be initiated by using "kgdb -r" if a local serial port is available and connected to the device under test. Extend this to communicate with a device under test connected via the Conserver port.

Add a command to gdb or lldb to allow searching memory for a value or byte string. Now implemented in lldb r186127.

Valgrind

USB kernel debugging

Use a EHCI Debug Port for ddb or gdb. Design for an adapter can be found at https://bitbucket.org/kmalkki/fx2lib .

Jail enhancements

Per-jail release overrides

Allow release-related variables to be set on a jail-wide basis.

Filesystem support

Add support for mounting in jails:

  • devfs (Possible in 9.1+ via allow.mount.devfs)
  • nullfs (Possible in 9.1+ via allow.mount.nullfs)
  • unionfs

Comprehensive time accounting

Completely avoid statclock vs hardclock aliasing and other issues by switching from sampled CPU time accounting to comprehensive (i.e., by recording a CPU counter on each context switch).

  • phk
  • jhb

Installation packaging and deployment

EdMaste/Projects (last edited 2025-02-04T20:51:09+0000 by EdMaste)