Page MenuHomeFreeBSD

xen/debug: remove usage of sbuf_{clear,finish}() on drained sbuf
AcceptedPublic

Authored by royger on May 2 2024, 2:28 PM.
Tags
None
Referenced Files
F125002382: D45060.id138017.diff
Sat, Aug 2, 6:37 AM
Unknown Object (File)
Thu, Jul 31, 4:18 AM
Unknown Object (File)
Sat, Jul 26, 5:18 PM
Unknown Object (File)
Sat, Jul 19, 11:37 PM
Unknown Object (File)
Sat, Jul 19, 12:42 AM
Unknown Object (File)
Sun, Jul 13, 3:21 PM
Unknown Object (File)
Thu, Jul 10, 6:49 AM
Unknown Object (File)
Wed, Jul 9, 4:49 AM

Details

Summary

Using sbuf_clear() on a drained sbuf is explicitly prohibited, and using
sbuf_finish() after printing a trace leads to a single trace being printed, as
after calling sbuf_finish() further attempts to use the same sbuf will lead to
a panic.

While there also switch to using xen_emergency_print() instead of attempting to
write directly to the hypervisor console. xen_emergency_print() can be
implemented per-arch to use a different mechanism than the console hypercall
(note the default implementation still uses the console hypercall).

Fixes: df62b8a25f47 ('xen: add a handler for the debug interrupt')
Sponsored by: Cloud Software Group

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped