Page MenuHomeFreeBSD

ktrace: generate events on extended errors
ClosedPublic

Authored by kib on Sat, May 31, 11:07 PM.
Tags
None
Referenced Files
F120555726: D50633.id156447.diff
Thu, Jun 19, 3:00 AM
Unknown Object (File)
Tue, Jun 17, 7:31 PM
Unknown Object (File)
Tue, Jun 17, 1:01 AM
Unknown Object (File)
Mon, Jun 16, 5:57 PM
Unknown Object (File)
Mon, Jun 16, 2:18 AM
Unknown Object (File)
Wed, Jun 11, 2:35 PM
Unknown Object (File)
Wed, Jun 11, 8:10 AM
Unknown Object (File)
Mon, Jun 9, 3:15 AM

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

kib requested review of this revision.Sat, May 31, 11:07 PM

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.

This revision is now accepted and ready to land.Mon, Jun 2, 8:46 PM
kib marked 2 inline comments as done.Mon, Jun 2, 9:26 PM
kib added inline comments.
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.

kib marked an inline comment as done.

Change to tab in the structure def.
Expand comment in exterr_cat.h.

This revision now requires review to proceed.Mon, Jun 2, 9:27 PM

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?

In D50633#1156349, @kib wrote:

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.

Add break after kexterror() call.

In D50633#1156370, @kib wrote:

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.

And we can bump version, to not break things too much. I will not add compat code though.

In D50633#1156370, @kib wrote:

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?

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.

In D50633#1156370, @kib wrote:

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?

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.