The ktrexterr() function is provided unconditionally, to mitigate the issue of missed include of "opt_ktrace.h" before using exterrvar.h otherwise.
Details
- Reviewers
brooks jrtc27 - Commits
- rG2a35b00732d9: kern/kern_ktrace.c: normalize includes
rGe26f3836d4e1: kdump(1): Use static array for header types string literals
rGde6012c48e21: kdump: staticise functions in kdump.c
rG9a0360355792: kdump(1): pretty-print KTR_EXTERR
rG96f4be881e8e: ktrace(1): teach about KTR_EXTERR
rG6d43260d49e6: ktrace: generate events on extended errors
rG6abe7e2a929c: exterr: add category for ktrace
rGac1a57f6c325: ktrace: define user interface for tracing extended errors
rGe5586b32d2dc: exterr: move the definition of user-visible struct uexterror into…
rGb3a93154db74: Extract exterr_to_ue()
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Skipped - Unit
Tests Skipped
Event Timeline
Looks good. I can replace our CheriBSD SYSERRCAUSE with this pretty easily.
The verbose formatted output does somewhat make me want a valid fields bitmask (particularly as I'm planning to steal the reserved space for two 128-bit capabilities so we can pretty print them.)
sys/kern/kern_ktrace.c | ||
---|---|---|
107 | Hard to be sure in phab, but it looks like there might be a whitespace difference to the existing lines after struct | |
sys/sys/exterr_cat.h | ||
16 | I don't understand this comment. |
sys/sys/exterr_cat.h | ||
---|---|---|
16 | I mean that this category is only to have something to satisfy requirement of exterrvar.h so it can be included into kern_ktrace.c. ktrace facility is not supposed to generate extended errors. |
The verbose formatted output does somewhat make me want a valid fields bitmask (particularly as I'm planning to steal the reserved space for two 128-bit capabilities so we can pretty print them.)
Do you intend to code this yourself?
I'm happy to code to the capability bits. I'm less sure where to find bits for a mask.
usr.bin/kdump/kdump.c | ||
---|---|---|
526 | Does this want a /* FALLTHROUGH */? |
I'm happy to code to the capability bits. I'm less sure where to find bits for a mask.
I am not sure what do you mean. Are you saying that you do not want to use one of the rsrv1[] array member for the flags?
We can break ABI in main, I believe.
usr.bin/kdump/kdump.c | ||
---|---|---|
526 | No, it would be too ugly. I fixed ktrexterr() by adding \n. |
And we can bump version, to not break things too much. I will not add compat code though.
I'd need all of the space in rsrv1 for two capabilities (128-bits each, strongly aligned (although just for convenience in this case)). I'll try a couple things and see what makes sense once this is in.
For cheri you can break ABI as you want, anyway.
But I will add uint32_t flags field and bump the version after this change is committed, as promised.